标签:none class string 不能 无效 system ann java public
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.
标签:none class string 不能 无效 system ann java public
原文地址:https://www.cnblogs.com/yyyyym/p/12573258.html