#include
#include
#include
main()
{
char jp[50];
char *jns[50];
float hrg[50],ttl[50];
float jb=0,pjk,tb;
int i,j,bp[50];
clrscr();
cout<<" GEROBAK FRIED CHICKEN "<
cout<<"----------------------------------------"<
cout<<" Kode Jenis Harga "<
cout<<"----------------------------------------"<
cout<<" D Dada Rp. 2500 "<
cout<<" P Paha Rp. 2000 "<
cout<<" S Sayap Rp. 1500 "<
cout<<"----------------------------------------"<
cout<<" Banyak jenis : "; cin>>j;
for(i=1;i<=j;++i)
{
cout<
cout<<" Jenis Ke - "< jp:
cout<<" Jenis Potong [D/P/S] : "; cin>>jp[i];
if(jp[i]=='D' || jp[i]=='d')
{ jns[i]="Dada"; hrg[i]=2500; }
else if(jp[i]=='P' || jp[i]=='p')
{ jns[i]="Paha"; hrg[i]=2000; }
else if(jp[i]=='S' || jp[i]=='s')
{ jns[i]="Sayap"; hrg[i]=1500; }
else
{ goto jp; }
cout<<" Banyak Potong : "; cin>>bp[i];
}
clrscr();
cout<<" GEROBAK FRIED CHICKEN "<
cout<<"----------------------------------------------"<
cout<<" No Jenis Harga Banyak Jumlah "<
cout<<" Potong Satuan Beli Harga "<
cout<<"----------------------------------------------"<
for(i=1;i<=j;++i)
{
gotoxy(3,9+i); cout<
gotoxy(10,9+i); cout<
gotoxy(18,9+i); cout<<"Rp. "<
gotoxy(32,9+i); cout<
ttl[i]=bp[i]*hrg[i];
gotoxy(40,9+i); cout<<"Rp. "<
cout<
jb=jb+ttl[i];
}
cout<
cout<<"----------------------------------------------"<
cout<<" Jumlah Bayar : Rp. "<
pjk=jb*0.1 ;
cout<<" Pajak 10 % : Rp. "<
tb=jb+pjk;
cout<<" Total Bayar : Rp. "<
getch();
}
0 komentar