#include <stdio.h>
#include <conio.h>
#include <iostream.h>
main()
{
char np[20],k_t[20],kb[5],*mrk,*kelas;
float hrg;
cout<<"======================"<<endl;
cout<<" PERUSAHAAN ADI DESU "<<endl;
cout<<"======================"<<endl;
cout<<"Nama Penumpang :";cin>>np;
cout<<"Kota Tujuan :";cin>>k_t;
cout<<"Kode Bus :";cin>>kb;
if(!strcmp(kb,"B-001"))
{
mrk="Lorena";
kelas="Bisnis";
hrg=50000;
}
else if(!strcmp(kb,"E-001"))
{
mrk="Rudi";
kelas="Ekonomi";
hrg=30000;
}
else if(!strcmp(kb,"EX-001"))
{
mrk="Arimbi";
kelas="Eksekutif";
hrg=80000;
}
else
{
mrk="AYAN";
kelas="rakyat";
hrg=15000;
}
clrscr();
cout<<"====================="<<endl;
cout<<" PERUSAHAAN ADI DESU"<<endl;
cout<<"====================="<<endl;
cout<<"Nama :"<<np<<endl;
cout<<"Kota Tujuan :"<<k_t<<endl;
cout<<"Nama Bus :"<<mrk<<endl;
cout<<"Kelas :"<<kelas<<endl;
cout<<"Harga :"<<hrg<<endl;
getch();
}
Selasa, 09 Oktober 2012
Script Borland C++ 5.02 part 2
04.49
AdiDesuBSI
No comments
0 komentar:
Posting Komentar