import javax.swing.*;
publicclass ex5 {
publicstaticvoid main(String[] args){
String str="";
str=JOptionPane.
showInputDialog("請輸入N的值(輸入exit退出):");
int N;
N=0;
try{
N=Integer.
parseInt(str);
}
catch(NumberFormatException e){
e.printStackTrace();
}
str=(N>90?"A":(N>60?"B":"C"));
System.
out.println(str);
}
}
*