package
TokoNovia;
import
javax.swing.JOptionPane;
public
class TokoNovia {
public static void main(String[] args) {
JOptionPane.showMessageDialog(null,
"Selamat Datang ! \n \t"+ "Selamat Berbelanja !");
JOptionPane.showMessageDialog(null,
"Silahkan Masukkan Nama Barang");
String A;
String B =
JOptionPane.showInputDialog("Nama Barang :");
JOptionPane.showMessageDialog(null,
"Nama Barang :" +B,
"Input ", JOptionPane.INFORMATION_MESSAGE);
String input1;
String input2;
int nilai1;
int nilai2;
int kali;
JOptionPane.showMessageDialog(null, "Masukkan Jumlah
Barang!");
input1 =
JOptionPane.showInputDialog("Jumlah Barang");
JOptionPane.showMessageDialog(null, "Masukkan Harga Barang!");
input2 =
JOptionPane.showInputDialog("Harga Barang");
nilai1 = Integer.parseInt (input1);
nilai2 = Integer.parseInt (input2);
kali = nilai1*nilai2;
JOptionPane.showMessageDialog(null, "Total = Rp"+ kali,
"Perkalian",JOptionPane.PLAIN_MESSAGE);
JOptionPane.showMessageDialog(null,
"Terima Kasih Atas Kunjungan Anda \n \t"+ "Selamat Berbelanja
Kembali !");
}
}
Tidak ada komentar:
Posting Komentar