import java.util.Scanner;
class Test14 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
System.out.print("请输入第一个数字:");
int i = sc.nextInt();
System.out.print("请输入第二个数字:");
int j = sc.nextInt();
boolean z = (i == j);
if (z == true) {
System.out.println(i+"和"+j+"这两个数相等");
}else{
System.out.println(i+","+j+"这两个数不相等");
}
}
}
|
|