//efek salju

Kamis, 08 November 2012

menentukan jumlah harga pembelian buku menggunakan c++


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

main()
 
{
float total_beli, diskon, total_bayar;

clrscr();

cout<<"Toko Buku
 Kamseupay"<<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();
}