Files
java-homework/实验1/task2.java
T

18 lines
607 B
Java
Executable File
Raw 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));
}
}