1. #include<conio.h>
#include<stdio.h>
#include<iostream.h>
int main()
{
float total_beli, diskon, total_bayar;
clrscr();
cout<<"Toko Buku Tata"<<endl;
cout<<"============"<<endl;
cout<<"Total Pembelian = Rp. ";cin>>total_beli;
cout<<endl;
if (total_beli>=100000)
diskon = 0.1 * total_beli;
else
diskon = 0;
cout<<"======================"<<endl;
cout<<"Diskon = Rp. "<<diskon<<endl;
total_bayar=total_beli-potongan;
cout<<"Total Bayar = Rp. "<<total_bayar;
getch();
return 0;
}
Tidak ada komentar:
Posting Komentar