#include
class Barang
{
private:
float Harga;
public:
void Masuk_Data(int harga);
void Tampil_Data();
};
void Barang::Masuk_Data(int hrg)
{Harga=hrg;}
void Barang::Tampil_Data()
{
cout<<"\n Harga Barang="<
void main()
{
clrscr();
Barang B1,B2;
B1.Masuk_Data(1000.0);
B2.Masuk_Data(1500.0);
B1.Tampil_Data();
B2.Tampil_Data();
getch();
}
0 comments:
Speak up your mind
Tell us what you're thinking... !