#include "stdio.h"
#include "conio.h"
#include "iostream.h"
#include "iomanip.h"
garis()
{ cout<<" \n \n -------------------------------------------------------- \n \n"; }
char *merk(char kd)
{
if((kd=='A')||(kd=='a')) {return "Acer";}
else if((kd=='S')||(kd=='s')) {return "Toshiba";}
else {return "Dell";}
}
float harga(char kd)
{
if((kd=='A')||(kd=='a')) {return 6550000;}
else if((kd=='S')||(kd=='s')) {return 8750000;}
else {return 5150000;}
}
main()
{
int i,jml; float t,d,hb;
struct
{
char nm[15],brg[10],kd;
int it,jml;
float hrg,ttl;
}beli[20];
clrscr();
garis();
cout<<" PT. GIGAMART "<
cout<
cout<
cout<
for(i=1;i<=jml;i++)
{
cout<<" Data Ke - "< cout<<" Nama pembeli : "; cin>>beli[i].nm;
cout<<" Kode [A/S/D] : "; cin>>beli[i].kd;
cout<<" Item yg dibeli : "; cin>>beli[i].it;
cout<
t = t + beli[i].ttl;
}
clrscr();
garis();
cout<<" PT. GIGAMART "<
cout<<" No. Merk Item Harga Total "<
cout<
for(i=1;i<=jml;i++)
{
cout<
getch();
}
0 komentar