parking charge system c++

#include<iostream>



using namespace std;

main()

{

cout<<"\n\t\tC A R  P A R K I N G"<<endl<<endl;

int enter;

int car=0,bike=0,rikshaw=0;

while(true)

{

cout<<"Press 1 to enter car"<<endl;

cout<<"Press 2 to enter bike"<<endl;

cout<<"Press 3 to enter rikshaw"<<endl;

cout<<"Press 4 to show the record"<<endl;

cout<<"Press 5 to delete the record"<<endl;

cout<<"Press 6 to exit"<<endl;

cin>>enter;

if(enter==1)

{

car++;

cout<<"Car is added"<<endl;

}

else if(enter==2)

{

bike++;

cout<<"Bike is added"<<endl;

}

else if(enter==3)

{

rikshaw++;

cout<<"Rikshaw is added"<<endl;

}

else if(enter==4)

{

cout<<"\n---Data---"<<endl<<endl;

cout<<"Cars: "<<car<<endl;

cout<<"Bikes: "<<bike<<endl;

cout<<"Rikshaws: "<<rikshaw<<endl;

}

else if(enter==5)

{

car=0;

bike=0;

rikshaw=0;

cout<<"\nYour Record is deleted"<<endl<<endl;

}

else if(enter==6)

{

exit(0);

}

     }

}

Comments

  1. i got the error
    "exit() is not declared in this scope."
    Then i changed the header file from iostream to #include, and the problem is solved. This header file includes everything, super boss of all other header files.

    ReplyDelete
  2. MGM National Harbor - Tunica, MS - KT Hub
    MGM National Harbor Hotel & 구미 출장마사지 Casino Tunica is situated in Tunica Resorts' 부천 출장마사지 beautiful Tunica Resorts Collection. 전라북도 출장안마 Guests can enjoy 동해 출장안마 their stay at 태백 출장마사지 the casino,

    ReplyDelete

Post a Comment