DISKON
#include <iostream.h>
#include <conio.h>
void main ()
{
long diskon, total;
float harga;
diskon = 0;
total = 0;
cout<<"MURAH MERIAH!!"<<endl;
cout<<"Harga Barang = ";
cin>>harga;
cout<<"\n";
if (harga>=2000000){
diskon = harga*(0.05);
total = harga - diskon;
cout<<"Diskon 5% = "<<diskon<<endl;
cout<<"TOTAL HARGA = "<<total<<endl;
cout<<"\nBONUS KAOS!!!!"<<endl;}
else
cout<<"HARGA NORMAL"<<endl;
cout<<"TOTAL HARGA = "<<harga<<endl;
}
No comments:
Post a Comment