Kak Fadli saya masukan contoh program C++. tolong di nilai, makasih.
---------------------------------------------------------------------
#include
#include
#include
main()
{
char *nm_mkn,*nm_mnm,kd_paket,tanya;
long jum_bel,harga,bayar,kembali,total;
lagi:
clrscr;
cout <<"______________________________________\n";
cout <<" RUMAH MAKAN CPTY RIA \n";
cout <<" Jl. Raya Makam Pahlawan Kalibata\n";
cout <<"_____________________________________\n";
cout <<" Nama Paket [A/B/C]: ";cin >> kd_paket;
cout <<" Jumlah Beli : ";cin >> jum_bel;
cout <<"_____________________________________\n";
if (kd_paket=='A' || kd_paket=='a')
{nm_mkn="nasi goreng";
nm_mnm="teh botol";
harga=12000;
}
else
if (kd_paket=='B' || kd_paket=='b')
{nm_mkn="nasi soto";
nm_mnm="teh asem";
harga=10000;
}
else
if (kd_paket=='C' || kd_paket=='c')
{nm_mkn="nasi kari ayam";
nm_mnm="jus alpukat";
harga=18000;
}
cout <<"______________________________________\n";
cout <<" RUMAH MAKAN CPTY RIA \n";
cout <<" Jl. Raya Makam Pahlawan Kalibata\n";
cout <<"_____________________________________\n";
cout <<" Nama Makanan : "<<>
cout <<" Nama Minuman : "<<>
cout <<" Harga :Rp "<<>
cout <<"______________________________________\n";
total=jum_bel*harga;
cout <<" Total Bayar :Rp "<<>
cout <<" Bayar :Rp ";cin >> bayar;
cout <<"______________________________________\n";
kembali=bayar-total;
cout <<" Kembali :Rp "<<>
cout <<"_____________________________________\n";
cout <<" TERIMA KASIIIIIH.............\n";
cout <<"_____________________________________\n";
cout <<" Mau Input Data Lagi????? [Y/N] ";cin >> tanya;
if (tanya=='Y' || tanya=='y')
goto lagi;
else
goto selesai;
getch();
selesai:
}
Tampilan Layar
---------------------------