Rabu, 20 April 2011

Potongan Harga Pembelian

#include <stdio.h>
#include <conio.h>
#include <iostream.h>

void main()
{
double total, potongan=0, jumlah=0;

cout<<"Total pembelian   Rp. ";
cin>>total;

if (total >= 50000)
potongan = 0.2 * total;

cout<<"Besarnya potongan Rp. "<<potongan<<endl;
jumlah = total - potongan;
cout<<"-------------------------------------"<<endl;
cout<<" Jumlah yang harus dibayarkan Rp. ";
cout<<jumlah;

getch();
}

0 komentar:

Posting Komentar

 
wordpress web hosting