Files
2024-06-11 01:53:01 +08:00

18 lines
624 B
Java
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import java.util.Scanner;
public class task2 {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.println("请输入一个数a");
int a = input.nextInt();
System.out.println("请输入一个数b");
int b = input.nextInt();
System.out.println("a==b=" + (a == b));
System.out.println("a!=b=" + (a != b));
System.out.println("a>b=" + (a > b));
System.out.println("a<b=" + (a < b));
System.out.println("b>=a=" + (b >= a));
System.out.println("b<=a=" + (b <= a));
}
}