编写一个程序,从命令行得到三个整参数。如果它们都相等则打印equal,否则打印not equal
代码
public class Main {
public static void main(String[] args) {
int a = StdIn.readInt();
int b = StdIn.readInt();
int c = StdIn.readInt();
if (a==b&&a==c){
System.out.println("equal");
}else{
System.out.println("not equal");
}
}
}
结果
1 2 1
not equal