#include<iostream.h>
#include<stdio.h>
#include<conio.h>
main()
{
char nmbrg[10];
int hrg,jml,ttl,ubay,ukem;
float pot,totbay;
//hrg=harga;jml=jumlah_beli;ttl=total;ubay=uang_bayar;ukem=uang_kembali;nmbrg=nama_barang;
//pot=potongan;totbay=total_bayar;
cout<<"========================================================"<<endl;
cout<<" LAUNG CELLULER "<<endl;
cout<<"========================================================"<<endl;
cout<<" Nama Barang = ";gets(nmbrg);
cout<<" Harga Barang = ";cin>>hrg;
cout<<" Jumlah Beli = ";cin>>jml;
ttl=hrg*jml;
if(jml>5);
{pot=0.1*ttl;}
{pot=0;}
cout<<"======================================================="<<endl;
cout<<" TOTAL = "<<ttl<<endl;
cout<<" POTONGAN = "<<pot<<endl;
cout<<"======================================================="<<endl;
totbay=ttl-pot;
cout<<" TOTAL BAYAR = "<<totbay<<endl;
cout<<" UANG BAYAR = ";cin>>ubay;
ukem=ubay-totbay;
cout<<" UANG KEMBALI = "<<ukem<<endl;
getch ();
}
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar