#include<iostream.h>
#include<conio.h>
int main()
{
clrscr();
char vehicle;
cout<<"Displaying the parking charges of vehicles\n\n";
cout<<"\n---Press 'c' for car, 'b' for bus & 't' for truck---\n\n\n";
cout<<"Enter type of vehicle: ";
cin>>vehicle;
if(vehicle=='c')
cout<<"\nCar: "<<"\tRs.5 "<<"\tPer hour";
else if(vehicle=='b')
cout<<"\nBus: "<<"\tRs.10 "<<"\tPer hour";
else if(vehicle=='t')
cout<<"\nTruck: "<<"\tRs.15 "<<"\tPer hour";
else
cout<<"\nInvlaid option";
getch();
return 0;
}
0 comments:
Post a Comment