Program Pernyataan if |
/*filename = Program Pernyataan if */
/*Oleh : fk_seven */
/*Date : 14 Agustus 2011 */
#include <conio.h>
#include <iostream.h>
void main()
{
double tot_beli, pot=0, jml_byr=0;
cout<<"Total Pembelian = ";
cin>>tot_beli;
if(tot_beli >= 100000)
pot = 0.2 * tot_beli;
else
pot = 0.05 * tot_beli;
cout<<"besarnya potongan = "<<pot<<endl;
jml_byr = tot_beli - pot;
cout<<"jumlah bayar = "<<jml_byr<<endl;
getch();
}
0 komentar:
Posting Komentar