#include<conio.h>
#include<iostream.h>
void main()
{
double tot_beli, pot=0, jum_bayar=0;
cout<<"Total Pembelian Rp. ";
cin>>tot_beli;
if (tot_beli >= 10000)
pot = 0.2 * tot_beli;
cout<<"Besarnya Potongan Rp. "<<pot<<endl;
jum_bayar = tot_beli - pot;
cout<<"Jumlah yang harus dibayarkan Rp. ";
cout<<jum_bayar;
getch();
}
#include<iostream.h>
void main()
{
double tot_beli, pot=0, jum_bayar=0;
cout<<"Total Pembelian Rp. ";
cin>>tot_beli;
if (tot_beli >= 10000)
pot = 0.2 * tot_beli;
cout<<"Besarnya Potongan Rp. "<<pot<<endl;
jum_bayar = tot_beli - pot;
cout<<"Jumlah yang harus dibayarkan Rp. ";
cout<<jum_bayar;
getch();
}
0 komentar :
Posting Komentar