Car parking program in c++(Urdu | Hindi) for beginners with Source Code simple c++ programs| C++ Mini Projects || Muhammad Hashmi
#include<iostream>
#include<conio.h>
using namespace std;
int main()
{
//Writen by Mr. Muhammad Hashmi
// SubScribe to My Channel: MH Computer Academy
int input , amount=0 , count=0;
int rickshaw=0 , bus=0, car=0;
while(true)
{
cout<<"%%%%%%%Parking Management System%%%%%%%"<<endl;
cout<<"\tPress 1 for Rickshaw"<<endl;
cout<<"\tPress 2 for Car"<<endl;
cout<<"\tPress 3 for Bus"<<endl;
cout<<"\tPress 4 to Show Record"<<endl;
cout<<"\tPress 5 to Delete Record"<<endl;
cout<<"\tPress 6 to Exit the Program"<<endl;
cout<<"%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%"<<endl;
cin>>input;
if(input==1)
{// For Rickshaw
if(count<=50)
{
rickshaw++;
amount=amount + 30;
count++;
}
else
{
cout<<"Parking is Full For Rickshaw"<<endl;
}
}
else if(input==2)
{ // For Car
if(count<=50)
{
car++;
amount=amount + 50;
count++;
}
else
{
cout<<"Parking is Full For Car"<<endl;
}
}
else if(input==3)
{ // For Bus
if(count<=50)
{
bus++;
amount=amount + 100;
count++;
}
else
{
cout<<"Parking is Full For Bus"<<endl;
}
}
else if(input==4)
{cout<<"\t\t\t\t\t *********************************************"<<endl;
cout<<"\t\t\t\t\t\tTotal amount of vehicles fee ="<<amount<<endl;
cout<<"\t\t\t\t\t\tTotal number fo vehicles are parkes="<<count<<endl;
cout<<"\t\t\t\t\t\tParked Rickshaw's ="<<rickshaw<<endl;
cout<<"\t\t\t\t\t\tParked Car's "<<car<<endl;
cout<<"\t\t\t\t\t\tParked Buses ="<<bus<<endl;
cout<<"\t\t\t\t\t *********************************************"<<endl;
}
else if(input==5)
{
amount=0;
count=0;
rickshaw=0;
car=0;
bus=0;
cout<<"\t\t\t\t\t\t\t****************"<<endl;
cout<<"\t\t\t\t\t\t\t Record Deleted"<<endl;
cout<<"\t\t\t\t\t\t\t****************"<<endl;
}
else if(input==6)
{
exit(0);
}
else
{
cout<<"You Entered an Invalid Number"<<endl;
}
}
getch();
}
Comments
Post a Comment