UAS Praktek C++

#include;
#include;
#include;
class
{
public:
char kode[5],*merk;
int jubel;
long int hrg,ttl;
}hp[5];
main()
{
char np[20],nk[20],lg;
int judat,i;
long int ttlbyr=0;

ulang:
clrscr();
cout<<“\t\”121K CELL”;

cout<<“Masukan Nama Kasir =”;gets(nk);

cout<<“Masukan Nama Pembeli =”;gets(np);

cout<<“Masukan Jumlah Data =”;cin>>judat;
for(i=1;i<=judat;++i)

{

cout<<“Data ke-“<<<<“Kode Handpone =”;cin>>hp[i].kode;
if(strcmp(hp[i].kode,”NK66″)==0||strcmp(hp[i].kode,”nk66″)==0)
{hp[i].merk=”Nokia 6600″;hp[i].hrg=1200000;}
else if(strcmp(hp[i].kode,”SE80″)==0||strcmp(hp[i].kode,”se80″)==0)
{hp[i].merk=”Soni Ericson W80″;hp[i].hrg=1500000;}
else if(strcmp(hp[i].kode,”NK73″)==0||strcmp(hp[i].kode,”nk73″)==0)
{hp[i].merk=”Nokia N73″;hp[i].hrg=1700000;}
else if(strcmp(hp[i].kode,”SM75″)==0||strcmp(hp[i].kode,”sm75″)==0)
{hp[i].merk=”Siemens C73″;hp[i].hrg=1700000;}

cout<<“Merk Handpone =”<<<<“Harga =”<<<<“Masukan Jumlah Beli =”;cin>>hp[i].jubel;

hp[i].ttl=hp[i].hrg*hp[i].jubel;
}
clrscr();
cout<<“\tCounter Handpone \”KONOHA CELL\””<<<“\t Laporan Penjualan Handpone”<<<“===============================================”<<<“Nama Kasir =”<<<<“Nama Pembeli =”<<<<“====================================================================”<<<“No Kode Merk Harga Jumlah Total”<<<” HP Hp Beli “<<<“====================================================================”<<<” “<<<“====================================================================”<<<<<<<<<<“===================================================================”<<<“\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ Total bayar=”<<<<<<“Mau input data lagi [Y/T]=”;cin>>lg;
if(lg==’Y’||lg==’y’)
goto ulang;
else
goto akhir;
getch();
akhir:
}

4 comments on “UAS Praktek C++

Komentar Disini

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s