import javax.swing.JOptionPane;
public class java{
public static void main(String args[])
{
String n1=JOptionPane.showInputDialog("請輸入一個整數");
String n2=JOptionPane.showInputDialog("請輸入一個整數");
int f1=Integer.parseInt(n1);
int f2=Integer.parseInt(n2);
int sum=f1+f2;
JOptionPane.showMessageDialog(null,f1+"+"+f2+"="+sum,"result",JOptionPane.PLAIN_MESSAGE);
}
}
public class java{
public static void main(String args[])
{
String n1=JOptionPane.showInputDialog("請輸入一個整數");
String n2=JOptionPane.showInputDialog("請輸入一個整數");
int f1=Integer.parseInt(n1);
int f2=Integer.parseInt(n2);
int sum=f1+f2;
JOptionPane.showMessageDialog(null,f1+"+"+f2+"="+sum,"result",JOptionPane.PLAIN_MESSAGE);
}
}
請先 登入 以發表留言。