#include "stdio.h"
#include "conio.h"
#include "iostream.h"
#include "iomanip.h"
garis()
{ cout<<" \n \n -------------------------------------------------------- \n \n"; }
char *merk(char kd)
{
if((kd=='H')||(kd=='h')) {return "Honda";}
else if((kd=='S')||(kd=='s')) {return "Suzuki";}
else if((kd=='K')||(kd=='k')) {return "Kawasaki";}
else {return "Yamaha";}
}
float harga(char kd)
{
if((kd=='H')||(kd=='h')) {return 14000000;}
else if((kd=='S')||(kd=='s')) {return 12500000;}
else if((kd=='K')||(kd=='k')) {return 21000000;}
else {return 13500000;}
}
main()
{
int i,jml; float t,d,hb,ppn,pt,ub,uk;
struct
{
char nm[15],brg[10],kd;
int it,jml;
float hrg,ttl;
}beli[20];
clrscr();
garis();
cout<<" DEALER DUAMOTOR "<
cout<
cout<
cout<
for(i=1;i<=jml;i++)
{
cout<<" Data Ke - "< cout<<" Nama pembeli : "; cin>>beli[i].nm;
cout<<" Kode [H/S/K/Y] : "; cin>>beli[i].kd;
cout<
}
clrscr();
garis();
cout<<" DEALER DUAMOTOR "<
cout<<" No. Merk Harga Total "<
cout<
for(i=1;i<=jml;i++)
{
cout<
garis();
cout<<" Total keseluruhan : Rp."<
cout<<" Potongan 2,5 % : Rp."<
cout<<" PPN 10% : Rp."<
hb = (t + ppn) - pt;
cout<<" Harga Bersih : Rp."<
uk = ub - t ;
garis();
cout<<" Uang Kembalian : Rp."<
getch();
}
0 komentar