Selasa, 30 November 2010

OOP_harga bersih

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

void main()
{
clrscr();
long int hbr,hbs;
float disc,bd;

cout << "Masukkan Harga Barang :Rp ";
cin >> hbr;
cout << "Masukkan Discount (%) : 12.5" <<endl;
cout << "------------------------------"<<endl;

bd = hbr / 12.5;
hbs = hbr-bd;

cout << "Harga Barang   :Rp " << hbr  << endl;
cout << "Besar Discount :Rp " << bd << endl;
cout << "Harga Bersih   :Rp " << hbs << endl;
getch();
}

Tidak ada komentar:

Posting Komentar