About The project
- How will this project help you
- Basic knowledge for this program
- source code
- source code explanation
- video explanation
- conclusion
- more projects
How will this project help you
- In this project you will get the basic knowledge about if else-if condition and how is it use in real life a project car management system project
- And some basic functions of c++ and specially we make projects for put our knowledge in real life . You will get to know how to reserve things and i want to say again this project is beginner friendly .
Basic knowledge for this program
To learn about this project you have to the basic knowledge of
- if else-if condition
- conditional statement
Source code
#include <iostream>
using namespace std;
int main()
{
cout << "\t \t C A R P A R K I N G" << endl;
int enter;
int car = 0, bike = 0, rikshaw = 0;
while (true) //continue the project infinite time
{
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 delet the record :" << endl;
cin >> enter;
if (enter == 1)
{
car++;
system("cls");
cout << "car is added" << endl;
}
else if (enter == 2)
{
bike++;
system("cls");
cout << "bike is added" << endl;
}
else if (enter == 3)
{
rikshaw++;
system("cls");
cout << "rikshaw is added" << endl;
}
else if(enter==4)
{
cout<<"CAR :- "<<car<<endl;
cout<<"BIKE :- "<<bike<<endl;
cout<<"RIKSHAW :- "<<rikshaw<<endl;
}
else if(enter==5)
{
car=0;
bike=0;
rikshaw=0;
system("cls");
cout<<"ALL Records are deleted :"<<endl;
}
else if(enter==6)
{
exit(0);
}
else
{
cout<<"Invalid input"<<endl;
}
}
}
Logic explanation
- First of all we add the required header files for the project and then we initialize the values Then we run an infinite loop which runs continuously inside this we ask to user for parking the vehicles and update the values for it and then display if user want to see the show the records ,this is the overall logic for this car management system project for more clarification watch out the video given below.
Post a Comment
Post a Comment
Please do not spam in comment