Subscribe For Free Updates!

We'll not spam mate! We promise.

Sunday 4 August 2013

Displyaing vehicle parking charges in c++


#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;
}

Socializer Widget By CodingLovers
SOCIALIZE IT →
FOLLOW US →
SHARE IT →

0 comments:

Post a Comment