Langsung Copy-paste ja..
hehe
Program Kasir Untuk Pusat Perbelanjaan C++
#include<iostream.h>
#include<conio.h>
void main()
{
double pembayaran, pembelian, diskon, bayar, sisa ;
cout<<"Total Pembelian = " ;
cin>>pembelian;
if ( pembelian>=100000 )
{
diskon=0.1*pembelian ;
pembayaran=pembelian-diskon ;
cout<<"Total pembayaran = "<<pembayaran;
cout<<"\n"
"Bayar = " ;
cin>>bayar;
sisa=bayar-pembayaran ;
cout<< "kembalian = "<<sisa;
}
else
{
diskon= 0*pembelian ;
pembayaran=pembelian-diskon ;
cout<< "Total pembayaran = "<<pembayaran;
cout<<"\n"
"Bayar = " ;
cin>>bayar;
sisa=bayar-pembayaran ;
cout<< "kembalian = "<<sisa;
}
getch () ;
}
Hasil Program :
Sunday, 13 July 2014
Author: wardana
Etiam at libero iaculis, mollis justo non, blandit augue. Vestibulum sit amet sodales est, a lacinia ex. Suspendisse vel enim sagittis, volutpat sem eget, condimentum sem.
0 komentar: