import javax.swing.JOptionPane;
public class Mytest {
public static void main(String[] args) {
String x=JOptionPane.showInputDialog(null,"请输入第一个数:");
int a=Integer.parseInt(x);
String y=JOptionPane.showInputDialog(null,"请输入第二个数:");
int b=Integer.parseInt(y);
String z=JOptionPane.showInputDialog(null,"请输入第三个数:");
int c=Integer.parseInt(z);
if(a>b && a>c){
JOptionPane.showMessageDialog(null, "最大的数是:"+a);
}
else if(b>a && b>c){
JOptionPane.showMessageDialog(null, "最大的数是:"+b);
}
else if(c>a && c>b){
JOptionPane.showMessageDialog(null, "最大的数是:"+c);
}
else{
JOptionPane.showMessageDialog(null, "你输入的数有重复,请重新输入!");
}
}
}
public class Mytest {
public static void main(String[] args) {
String x=JOptionPane.showInputDialog(null,"请输入第一个数:");
int a=Integer.parseInt(x);
String y=JOptionPane.showInputDialog(null,"请输入第二个数:");
int b=Integer.parseInt(y);
String z=JOptionPane.showInputDialog(null,"请输入第三个数:");
int c=Integer.parseInt(z);
if(a>b && a>c){
JOptionPane.showMessageDialog(null, "最大的数是:"+a);
}
else if(b>a && b>c){
JOptionPane.showMessageDialog(null, "最大的数是:"+b);
}
else if(c>a && c>b){
JOptionPane.showMessageDialog(null, "最大的数是:"+c);
}
else{
JOptionPane.showMessageDialog(null, "你输入的数有重复,请重新输入!");
}
}
}