#include
#include
#include
main()
{
char napen[20],kd[5],*nabar;
long hrg,tot,dis;
int lama;
clrscr();
cout<<" Lenen Komputer"<
cout<<" Jl. Wijaya Kusuma Jakarta "<
cout<<"========================================"<
cout<<"Nama penyewa :";cin>>napen;
cout<<"Kode :";cin>>kd;
if (strcmpi(kd,"L-01")==0)
{nabar="laptop";
hrg=100000;}
else if (strcmpi(kd,"L-02")==0)
{nabar="LCD";
hrg=850000;}
else
{nabar="Komputer";
hrg=650000; }
cout<<"Lama sewa :";cin>>lama;
if (lama > 5)
dis=0.1*hrg*lama;
else
dis=0;
tot=(hrg*lama)-dis;
clrscr();
cout<<" Lenen Komputer"<
cout<<" Jl. Wijaya Kusuma Jakarta "<
cout<<"========================================"<
cout<<"Nama Penyewa :"<<
cout<<"Kode :"<<
cout<<"Nama Barang :"<<
cout<<"Harga sewa/hari :"<<
cout<<"Lama Sewa :"<<
cout<<"Total Harga Sewa :"<<
getch();
}
Tampilan Program diatas :
Tidak ada komentar:
Posting Komentar