TUGAS A
#include
#include
#include
#include
struct
{
char nk,jns,*nl;
int trf,dur,ttl;
}rental[20];
long int tokes=0;
main()
{
int i,j;
char lagi;
atas:
clrscr();
cout<<"================================================="<
cout<
{
cout<<"Transaksi Ke - "<cout<<"No. Komputer :";cin>>rental[i].nk;
cout<<"Jenis Layanan :";cin>>rental[i].jns;
if(rental[i].jns=='A'||rental[i].jns=='a')
{rental[i].nl="Internet";rental[i].trf=2500;}
else if(rental[i].jns=='B'||rental[i].jns=='b')
{rental[i].nl="Game Online";rental[i].trf=3000;}
else if(rental[i].jns=='C'||rental[i].jns=='c')
{rental[i].nl="Game Offline";rental[i].trf=2000;}
else if(rental[i].jns=='D'||rental[i].jns=='d')
{rental[i].nl="Rental Pengetikan";rental[i].trf=1500;}
cout<<"Tarif Permenit :"<
rental[i].ttl=rental[i].trf*rental[i].dur;
tokes=tokes+rental[i].ttl;
cout<
clrscr();
cout<<"================================================="<
{
cout<
cout<<"================================================="<
cout<<"Return :";cin>>lagi;
if (lagi=='Y' || lagi=='y')
goto atas;
else
getch();
}
14.48
|
|
This entry was posted on 14.48
You can follow any responses to this entry through
the RSS 2.0 feed.
You can leave a response,
or trackback from your own site.
0 komentar:
Posting Komentar