2020.3.26
Posted yyyyym
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了2020.3.26相关的知识,希望对你有一定的参考价值。
package ifm; import java.util.*; public class ds { public static void main(String[] args) { // TODO Auto-generated method stub Scanner input = new Scanner(System.in); System.out.print("请输入分数:"); int x = input.nextInt(); int y = input.nextInt(); int z = input.nextInt(); System.out.print("请输入数字x:"); System.out.print("请输入数字y:"); System.out.print("请输入数字z:"); if(x>y){x=x^y; y=x^y; x=x^y; } if(y>z){ y=y^z; z=y^z; y=y^z; } if(x>y){ x=x^y; y=x^y; x=x^y; } System.out.println(x + "<" + y + "<" + z); } }
package ifm; import java.util.*; public class ds { public static void main(String[] args) { // TODO Auto-generated method stub Scanner input = new Scanner(System.in); System.out.print("请输入分数:"); int a = input.nextInt(); if(a>=90 && a<=100){ System.out.println("等级为A"); }else if(a>=80 && a<=89){ System.out.println("等级为B"); }else if(a>=70 && a<=79){ System.out.println("等级为C"); }else if(a>=60 && a<=69){ System.out.println("等级为D"); }else if(a>=0 && a<=59){ System.out.println("等级为E"); }else{ System.out.println("分数无效"); } } }
package ifm; import java.util.*; public class ifles { public static void main(String[] args) { // TODO Auto-generated method stub Scanner input = new Scanner(System.in); Scanner sc = new Scanner(System.in); System.out.print("请输入一个数字:"); int x = sc.nextInt(); if(x % 5 == 0 && x % 6 == 0){ System.out.println(x+"能被5和6整除"); }else if(x % 5 == 0){ System.out.println(x+"能被5整除"); }else if(x % 6 == 0){ System.out.println(x+"能被6整除"); }else{ System.out.println(x+"不能被5或6整除"); } }
package ifm; import java.util.*; public class ifles { public static void main(String[] args) { // TODO Auto-generated method stub Scanner input = new Scanner(System.in); int x=input.nextInt(); if(x == 1){ System.out.println("x="+x); } else if(x==5){ System.out.println("x="+x); }else if(x==10){ System.out.println("x="+x); }else; System.out.println("x=none"); } }
2.
以上是关于2020.3.26的主要内容,如果未能解决你的问题,请参考以下文章