···java
···
//输入三个整数的和 Scanner in = new Scanner(System.in); System.out.println("请输如第一个整数:"); int a =in.nextInt(); System.out.println("请输如第二个整数:"); int b =in.nextInt(); System.out.println("请输如第三个整数:"); int c =in.nextInt(); System.out.println((a+b>c));
Scanner in = new Scanner(System.in); System.out.println("请输如第一个整数:"); int a =in.nextInt(); System.out.println("请输如第二个整数:"); int b =in.nextInt(); System.out.println("请输如第三个整数:"); int c =in.nextInt(); System.out.println("请输如第四个整数:"); int d =in.nextInt(); System.out.println((a+b+c-d)>0);
public static void main(String[] arge) { Scanner in = new Scanner(System.in); System.out.println("请输入长的面积:"); int a = in.nextInt(); System.out.println("请输入宽的面积:"); int b = in.nextInt(); System.out.println("矩形的面积为:"+(a*b));
public static void main(String[] arge) { Scanner in = new Scanner(System.in); System.out.println("请输入半径:"); double a = in.nextDouble(); System.out.println("π"); double b = in.nextDouble(); System.out.println("园的面积为:"+(a*b));
public static void main(String[] arge) { Scanner in = new Scanner(System.in); System.out.println("请输入身高:"); int a = in.nextInt(); System.out.println("请输入体重:"); int b = in.nextInt(); System.out.println("标准体重为:" +(a+b)/2);
public static void main(String[] arge) { Scanner in = new Scanner(System.in); System.out.println("请输入你的薪资"); int a = in.nextInt(); System.out.println("请输入税率:"); double b = in.nextInt(); System.out.println("求税后的薪资实际:"+(a*b));
public static void main(String[] arge) { Scanner in = new Scanner(System.in); System.out.println("请输入一个整数"); int a = in.nextInt(); System.out.println("求这个数的平方为:"+(a*a));
public static void main(String[] args) { Scanner in = new Scanner(System.in); System.out.print("输入一个整数:"); int a = in.nextInt(); if(a/2>0||a/2<0){ System.out.println("该数是奇数"); }else{ System.out.println("该数是偶数");
public static void main(String[] args) { int jn = 2023; Scanner in = new Scanner(System.in); System.out.print("请输入你的出生年:"); int csn = in.nextInt(); if(csn>jn-20){ System.out.println("出生年比当前年数-20之后大"); }else{ System.out.println("出生年比当前年数-20之后小");