#include
#include
#include
#include
main()
{
int u,f;
struct
{char kd,*m,*j,*bns,nm[20];
int hrg,ppn,a,b;
}mtr[8];
char lagi,bln[10];
atas:
clrscr();
cout<
for(u=1;u<=f;u++)
{
cout<<"Data Ke-"<cout<<"Nama Pembeli :";cin>>mtr[u].nm;
cout<<"Masukan Kode Motor Yang Dibeli:[H/S/K/Y]?";cin>>mtr[u].kd;
if(mtr[u].kd=='H'||mtr[u].kd=='h')
{mtr[u].m="Honda";mtr[u].j="Jupiter";mtr[u].hrg=120000000;mtr[u].bns="helm";}
else if(mtr[u].kd=='S'||mtr[u].kd=='s')
{mtr[u].m="Suzuki";mtr[u].j="Ninja";mtr[u].hrg=180000000;mtr[u].bns="setrika";}
else if(mtr[u].kd=='K'||mtr[u].kd=='k')
{mtr[u].m="Kawasaki";mtr[u].j="Smash";mtr[u].hrg=11000000;mtr[u].bns="kaos";}
else
{mtr[u].m="Yamaha";mtr[u].j="Suprafit";mtr[u].hrg=10000000;mtr[u].bns="topi";}
//cout<<"Bulan Pembelian :";cin>>bln[u];
}
clrscr();
cout<<"\tTable Penjualan Motor"<
cout<<"========================================================================"<
gotoxy(7,5);cout<<"Merk";
gotoxy(14,5);cout<<"Jenis";
gotoxy(24,5);cout<<"Harga";
gotoxy(35,5);cout<<"Ppn";
gotoxy(42,5);cout<<"Pembeli";
gotoxy(51,5);cout<<"Jumlah Bulan";
gotoxy(59,5);cout<<"Angsuran";
gotoxy(65,5);cout<<"Bonus";
for(u=1;u<=f;u++)
{
gotoxy(2,6+u);cout<
gotoxy(39,6+u);cout<
gotoxy(51,6+u);cout<
cout<<"\n======================================================================"<
if(lagi=='y'||lagi=='Y')
goto atas;
else
goto umi;
umi:
getch();
}
0 komentar