//Text Dialog Penghitungan//
import javax.swing.JOptionPane;
public class Itungan
{
public static void main(String args[])
{
String A1;
String B2;
int A;
int B;
int C;
A1 = JOptionPane.showInputDialog("\"Masukan Angka Pertama\"");
B2 = JOptionPane.showInputDialog("\"Masukan Angka Kedua\"");
A = Integer.parseInt(A1);
B = Integer.parseInt(B2);
C = A * B;
JOptionPane.showMessageDialog(null,"C= "+C,"Hasil Penghitunga", JOptionPane.PLAIN_MESSAGE);
System.exit(0);
}
}
Categories:
java