Akuuu

Akuuu
My_Private

Senin, 19 April 2010

Tugas C++



Nama : Minhatul Maula
NIM : 12074425
Kelas : 12.6G.03
Kelompok : C

Tugas Borland C++

Listing

#include
#include
#include
main()
{
char kode_notebook,*merk,kode_type,*type;
long jumlah_beli,harga,total,uang_bayar,kembali;
clrscr();
cout<<" TOKO NOTEBOOK \n"; cout<<" Lab C Sore \n"; cout<<"_________________________\n"; cout<<"Kode Notebook=";cin>>kode_notebook;
cout<<"Kode Type=";cin>>kode_type;
cout<<"Jumlah_beli=";cin>>jumlah_beli;
if (kode_notebook =='A'||kode_notebook =='a')
{
merk="Acer";
if (kode_type=='1')
{
type="532H";
harga=2800000;
}
if (kode_type=='2')
{
type="4732H";
harga=4100000;
}
if (kode_type=='3')
{
type="4540";
harga=5500000;
}
}
else
if (kode_notebook=='B'||kode_notebook=='b')
{
merk="Byon";
if (kode_type=='1')
{
type="N-611-GA";
harga=2530000;
}
if (kode_type=='2')
{
type="M31H";
harga=4400000;
}
if (kode_type=='3')
{
type="W5321";
harga=7180000;
}
}
else
if (kode_notebook=='C'||kode_notebook=='c')
{
merk="Compaq";
if (kode_type=='1')
{
type="CQ40";
harga=4010000;
}
if (kode_type=='2')
{
type="CQ515";
harga=4500000;
}
if (kode_type=='3')
{
type="CQ41";
harga=4933000;
}
}
cout<<"________________________\n"; cout<<" TOKO NOTEBOOK \n"; cout<<" Lab C Sore \n"; cout<<"__________________________\n"; cout<<"Merk Notebook="<<<<"Type Notebook="<<<<"Harga Notebook="<<<<"__________________________\n"; total=harga*jumlah_beli; cout<<"Total Bayar="<<<<"Uang Bayar=";cin>>uang_bayar;
kembali=uang_bayar-total;
cout<<"Kembali="<<
cout<<"__________________________\n";
cout<<" TERIMA KASIH \n";
getch();
}



Tampilannya

Tidak ada komentar:

Posting Komentar