Car Rental System in C++ - Mini Project

At the end you can download cpp file of this project.

Code in C++ :

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
void rent(void);
void key(void);
void main()
{
clrscr();
int a,b;
double long d,c,e,f,g,h,i,z;
rent();
cout<<" \n 1:Toyota\n 2:Nissan\n 3:BMW\n 4:Ford\n 5:Jeep\n 6:Honda\n 7:Ferrari\n 8:Volve\n 9:Mitsubishi\n 10:Audi "<<endl;
cout<<" \nSelect any one Company = ";
cin>>a;
if (a==1 || a==2 || a==3 || a==4 || a==5 || a==6 || a==7 || a==8 || a==9 || a==10)
{
cout<<"\n\t\tYou Selected Company";
key();
getch();
clrscr();
rent();
switch (a)
{
case 1:
cout<<" You Select Toyota Company "<<endl;
cout<<" 1:Yaris\t\t 2:Corolla\n 3:Prius c\t\t 4:Camry\n 5:pirus\t\t 6:RAV4\n 7:Prius v\t\t 8:Sienna\n 9:Avalon\t\t 10: 4 Runner"<<endl;
cout<<" \nSelect any one Car = ";
cin>>b;

if (b==1)
{
cout<<" You Selected Yaris car "<<endl;
cout<<" Speed = 100km/h\n horse power =106\n Rent per Day = 2000 "<<endl;
z=2000;
}
else if (b==2)
{
cout<<" you selected Corolla Car "<<endl;
cout<<" Speed = 120km/h\n horse power =132-140\n Rent per Day = 2500 "<<endl;
z=2500;
}
else if (b==3)
{
cout<<" you selected Prius c Car "<<endl;
cout<<" Speed = 125km/h\n horse power =99\n Rent per Day = 2700 "<<endl;
z=2700;
}
else if (b==4)
{
cout<<" you selected Camry Car "<<endl;
cout<<" Speed = 135km/h\n horse power =178-268\n Rent per Day = 3000 "<<endl;
z=3000;
}
else if (b==5)
{
cout<<" you selected prius Car "<<endl;
cout<<" Speed = 145km/h\n horse power =121\n Rent per Day = 3300 "<<endl;
z=3300;
}
else if (b==6)
{
cout<<" you selected RAV4 Car "<<endl;
cout<<" Speed = 150km/h\n horse power =176\n Rent per Day = 3500 "<<endl;
z=3500;
}
else if (b==7)
{
cout<<" you selected Prius v Car "<<endl;
cout<<" Speed = 160km/h\n horse power =134\n Rent per Day = 4000 "<<endl;
z=4000;
}
else if (b==8)
{
cout<<" you selected Sienna Car "<<endl;
cout<<" Speed = 170km/h\n horse power =266\n Rent per Day = 4500 "<<endl;
z=4500;
}
else if (b==9)
{
cout<<" you selected Avalon Car "<<endl;
cout<<" Speed = 175km/h\n horse power =268\n Rent per Day = 5000 "<<endl;
z=5000;
}
else if (b==10)
{
cout<<" you selected 4 Runner Car "<<endl;
cout<<" Speed = 190km/h\n horse power =270\n Rent per Day = 6000 "<<endl;
z=6000;
}

else
{
cout<<" you selected Wrong Number"<<endl;
cout<<" please select the Correct Number, Thank you! "<<endl;
}
break;
case 2:
cout<<" You select Nissan Company "<<endl;
cout<<" 1:Altima\t\t 2:Armada\n 3:GT-R\t\t\t 4:Juke\n 5:Leaf\t\t\t 6:Mixma\n 7:Murano\t\t 8:NV200\n 9:Pathfinder\t\t 10:Quest\n 11:Sentra "<<endl;
cout<<" \nSelect any one Car = ";
cin>>b;
if (b==1)
{
cout<<" you selected Altima Car "<<endl;
cout<<" Speed = 100km/h\n horse power =182-270\n Rent per Day = 2000"<<endl;
z=2000;
}
else if (b==2)
{
cout<<" you selected Armada  Car "<<endl;
cout<<" Speed = 115km/h\n horse power =317\n Rent per Day = 2400"<<endl;
z=2400;
}
else if (b==3)
{
cout<<" you selected GT-R Car "<<endl;
cout<<" Speed = 120km/h\n horse power =545-600\n Rent per Day = 2700"<<endl;
z=2700;
}
else if (b==4)
{
cout<<" you selected Juke Car "<<endl;
cout<<" Speed = 127km/h\n horse power =188-215\n Rent per Day = 3000"<<endl;
z=3000;
}
else if (b==5)
{
cout<<" you selected Leaf Car "<<endl;
cout<<" Speed = 135km/h\n horse power =107\n Rent per Day = 3500"<<endl;
z=3500;
}
else if (b==6)
{
cout<<" you selected Mixma Car "<<endl;
cout<<" Speed = 140km/h\n horse power =300\n Rent per Day = 4000"<<endl;
z=4000;
}
else if (b==7)
{
cout<<" you selected Murana Car "<<endl;
cout<<" Speed = 145km/h\n horse power =260\n Rent per Day = 4500"<<endl;
z=4500;
}
else if (b==8)
{
cout<<" you selected NV200 Car "<<endl;
cout<<" Speed = 155km/h\n horse power =131\n Rent per Day = 5000"<<endl;
z=5000;
}
else if (b==9)
{
cout<<" you selected Pathfinder Car "<<endl;
cout<<" Speed = 160km/h\n horse power =260\n Rent per Day = 5500"<<endl;
z=5500;
}
else if (b==10)
{
cout<<" you selected Quest Car "<<endl;
cout<<" Speed = 170km/h\n horse power =260\n Rent per Day = 6000"<<endl;
z=6000;
}
else if (b==11)
{
cout<<" you selected Sentra Car "<<endl;
cout<<" Speed = 190km/h\n horse power =124*130\n Rent per Day = 7000 "<<endl;
z=7000;
}
else
{
cout<<" You selected Wrong number "<<endl;
cout<<" Please Enter the correct Numer, Thank you!"<<endl;
}
break;
case 3:
cout<<" You selected BMW Company "<<endl;
cout<<" 1:  2 series\t 2: 3 series\n 3:  4 series\t 4:  M2\n 5:  M3\t\t 6: M4\n 7:  X1\t\t 8: X3\n 9:  X4\t\t 10: I3\n 11: I8 "<<endl;
cout<<" \nSelect any one Car = ";
cin>>b;
if (b==1)
{
cout<<" you selectd 2 Series Car "<<endl;
cout<<" Speed = 100km/h\n horse power = 240\n Rent per Day = 4000 "<<endl;
z=4000;
}
else if (b==2)
{
cout<<" you selectd 3 Series Car "<<endl;
cout<<" Speed = 120km/h\n horse power = 180-320\n Rent per Day = 4500 "<<endl;
z=4500;
}
else if (b==3)
{
cout<<" you selectd 4 Series Car "<<endl;
cout<<" Speed = 130km/h\n horse power = 240-300\n Rent per Day = 5000 "<<endl;
z=5000;
}
else if (b==4)
{
cout<<" you selectd M2 Car "<<endl;
cout<<" Speed = 140km/h\n horse power = 365\n Rent per Day = 5500 "<<endl;
z=5500;
}
else if (b==5)
{
cout<<" you selectd M3 Car "<<endl;
cout<<" Speed = 150km/h\n horse power = 425\n Rent per Day = 6000 "<<endl;
z=6000;
}
else if (b==6)
{
cout<<" you selectd M4 Car "<<endl;
cout<<" Speed = 160km/h\n horse power = 425\n Rent per Day = 6500 "<<endl;
z=6500;
}
else if (b==7)
{
cout<<" you selectd X1 Car "<<endl;
cout<<" Speed = 170km/h\n horse power = 228\n Rent per Day = 7000 "<<endl;
z=7000;
}
else if (b==8)
{
cout<<" you selectd X3 Car "<<endl;
cout<<" Speed = 180km/h\n horse power = 180-300\n Rent per Day = 7500 "<<endl;
z=7500;
}
else if (b==9)
{
cout<<" you selectd X4 Car "<<endl;
cout<<" Speed = 190km/h\n horse power = 240-355\n Rent per Day = 8000 "<<endl;
z=8000;
}
else if (b==10)
{
cout<<" you selectd I3 Car "<<endl;
cout<<" Speed = 200km/h\n horse power = 170\n Rent per Day = 9000 "<<endl;
z=9000;
}
else if (b==11)
{
cout<<" you selectd I8 Car "<<endl;
cout<<" Speed = 210km/h\n horse power = 357\n Rent per Day = 10000 "<<endl;
z=10000;
}
else
{
cout<<" You selected Wrong number "<<endl;
cout<<" Please Enter the correct Numer, Thank you!"<<endl;
}
break;
case 4:
cout<<" You selected Ford Company "<<endl;
cout<<" 1: Fiesta\t\t 2: Focus\n 3: Fusion\t\t 4: Escape\n 5: Taurus\t\t 6: Edge\n 7: Flex\t\t 8: Explorer\n 9: Expedition "<<endl;
cout<<" \nSelect any one Car = ";
cin>>b;
if (b==1)
{
cout<<" You selected Fiesta Car "<<endl;
cout<<" Speed = 100km/h\n horse power = 120-197\n Rent per Day = 2000 "<<endl;
z=2000;
}
else if (b==2)
{
cout<<" You selected Focus Car "<<endl;
cout<<" Speed = 120km/h\n horse power = 123-350\n Rent per Day = 2500 "<<endl;
z=2500;
}
else if (b==3)
{
cout<<" You selected Fusion Car "<<endl;
cout<<" Speed = 130km/h\n horse power = 175-231\n Rent per Day = 3000 "<<endl;
z=3000;
}
else if (b==4)
{
cout<<" You selected Escape Car "<<endl;
cout<<" Speed = 135km/h\n horse power = 168-231\n Rent per Day = 3500 "<<endl;
z=3500;
}
else if (b==5)
{
cout<<" You selected Taurus Car "<<endl;
cout<<" Speed = 140km/h\n horse power = 240-365\n Rent per Day = 4000 "<<endl;
z=4000;
}
else if (b==6)
{
cout<<" You selected Edge Car "<<endl;
cout<<" Speed = 150km/h\n horse power = 245-315\n Rent per Day = 4500 "<<endl;
z=4500;
}
else if (b==7)
{
cout<<" You selected Flex Car "<<endl;
cout<<" Speed = 160km/h\n horse power = 280-365\n Rent per Day = 5000 "<<endl;
z=5000;
}
else if (b==8)
{
cout<<" You selected Explorer Car "<<endl;
cout<<" Speed = 170km/h\n horse power = 280-365\n Rent per Day = 6000 "<<endl;
z=6000;
}
else if (b==9)
{
cout<<" You selected Expedition Car "<<endl;
cout<<" Speed = 180km/h\n horse power = 365\n Rent per Day = 7000 "<<endl;
z=7000;
}
else
{
cout<<" You selected Wrong number "<<endl;
cout<<" Please Enter the correct Numer, Thank you!"<<endl;
}
break;
case 5:
cout<<" You selected jeep "<<endl;
cout<<" 1: Cherokee\t\t 2: Compass\n 3: Patriot\t\t 4: Renegede\n 5: Wangler "<<endl;
cout<<" \nSelect any one Car = ";
cin>>b;
if (a==1)
{
cout<<" You selected Cherokee Car "<<endl;
cout<<" Speed = 130km/h\n horse power = 240-475\n Rent per Day = 4000 "<<endl;
z=4000;
}
else if (b==2)
{
cout<<" You selected Compass Car "<<endl;
cout<<" Speed = 150km/h\n horse power = 158-172\n Rent per Day = 5000 "<<endl;
z=5000;
}
else if (b==3)
{
cout<<" You selected Patriot Car "<<endl;
cout<<" Speed = 170km/h\n horse power = 158-172\n Rent per Day = 7000 "<<endl;
z=7000;
}
else if (b==4)
{
cout<<" You selected Renegade Car "<<endl;
cout<<" Speed = 180km/h\n horse power = 160-180\n Rent per Day = 7500 "<<endl;
z=7500;
}
else if (b==5)
{
cout<<" You selected Wrangler Car "<<endl;
cout<<" Speed = 200km/h\n horse power = 285\n Rent per Day = 8000 "<<endl;
z=8000;
}
else
{
cout<<" You selected Wrong number "<<endl;
cout<<" Please Enter the correct Numer, Thank you!"<<endl;
}
break;
case 6:
cout<<" You selected Honda Company  "<<endl;
cout<<" 1: Ridgeline\t\t 2: Fit\n 3: HR-V\t\t 4: CR-Z\n 5: CR-V\t\t 6:Odyssey\n 7: Pilot "<<endl;
cout<<" \nSelect any one Car = ";
cin>>b;
if (b==1)
{
cout<<" You selected Ridgeline Car "<<endl;
cout<<" Speed = 130km/h\n Horse power = 150\n Rent per Day = 4000 "<<endl;
z=4000;
}
else if (b==2)
{
cout<<" You selected Fit Car "<<endl;
cout<<" Speed = 140km/h\n Horse power = 200\n Rent per Day = 5000 "<<endl;
z=5000;
}
else if (b==3)
{
cout<<" You selected HR-V Car "<<endl;
cout<<" Speed = 145km/h\n Horse power = 150 -170\n Rent per Day = 5500 "<<endl;
z=5500;
}
else if (b==4)
{
cout<<" You selected CR-Z Car "<<endl;
cout<<" Speed = 160km/h\n Horse power = 156\n Rent per Day = 6000 "<<endl;
z=6000;
}
else if (b==5)
{
cout<<" You selected CR-V Car "<<endl;
cout<<" Speed = 170km/h\n Horse power = 184\n Rent per Day = 7000 "<<endl;
z=7000;
}
else if (b==6)
{
cout<<" You selected Odyssey Car "<<endl;
cout<<" Speed = 175km/h\n Horse power = 174\n Rent per Day = 7500 "<<endl;
z=7500;
}
else if (b==7)
{
cout<<" You selected Pilot Car "<<endl;
cout<<" Speed = 190km/h\n Horse power = 200\n Rent per Day = 9000 "<<endl;
z=9000;
}
else
{
cout<<" You selected Wrong number "<<endl;
cout<<" Please Enter the correct Numer, Thank you!"<<endl;
}
break;
case 7:
cout<<" You selected Ferrari Company "<<endl;
cout<<" 1: 458\t\t\t 2: 488GTB\n 3:California T\t\t 4: F12 Berlinetta\n 5: FF "<<endl;
cout<<" \nSelect any one Car = ";
cin>>b;
if (b==1)
{
cout<<" You selected 458 Car "<<endl;
cout<<" Speed = 200km/h\n Horse power = 570\n Rent per Day = 5000 "<<endl;
z=5000;
}
else if (b==2)
{
cout<<" You selected 488 GTB Car "<<endl;
cout<<" Speed = 220km/h\n Horse power = 661\n Rent per Day = 6000 "<<endl;
z=6000;
}
else if (b==3)
{
cout<<" You selected Califorina T Car "<<endl;
cout<<" Speed = 240km/h\n Horse power = 553\n Rent per Day = 7000 "<<endl;
z=7000;
}
else if (b==4)
{
cout<<" You selected F12 Berlinetta Car "<<endl;
cout<<" Speed = 260km/h\n Horse power = 731\n Rent per Day = 8000 "<<endl;
z=8000;
}
else if (b==5)
{
cout<<" You selected FF Car "<<endl;
cout<<" Speed = 280km/h\n Horse power = 651\n Rent per Day = 9000 "<<endl;
z=9000;
}
else
{
cout<<" You selected Wrong number "<<endl;
cout<<" Please Enter the correct Numer, Thank you!"<<endl;
}
break;
case 8:
cout<<" You Selected Volve Company "<<endl;
cout<<" 1: S 60\t\t 2: V 60\n 3: XV 60\t\t 4: XC 70\n 5: S80\t\t\t 6: XC90 "<<endl;
cout<<" \nSelect any one Company ";
cin>>b;
if (b==1)
{
cout<<" You Selected S 60 Car "<<endl;
cout<<" Speed = 150km/h\n horse power = 240-345\n Rent per Day = 4000 "<<endl;
z=4000;
}
else if (b==2)
{
cout<<" You Selected V 60 Car "<<endl;
cout<<" Speed = 160km/h\n horse power = 240-345\n Rent per Day = 4500 "<<endl;
z=4500;
}
else if (b==3)
{
cout<<" You Selected XC 60 Car "<<endl;
cout<<" Speed = 170km/h\n horse power = 240-325\n Rent per Day = 5000 "<<endl;
z=5000;
}
else if (b==4)
{
cout<<" You Selected XC 70 Car "<<endl;
cout<<" Speed = 175km/h\n horse power = 240-250\n Rent per Day = 5500 "<<endl;
z=5500;
}
else if (b==5)
{
cout<<" You Selected S 80 Car "<<endl;
cout<<" Speed = 180km/h\n horse power = 240\n Rent per Day = 6000 "<<endl;
z=6000;
}
else if (b==6)
{
cout<<" You Selected XC 90 Car "<<endl;
cout<<" Speed = 190km/h\n horse power = 250-316\n Rent per Day = 7000 "<<endl;
z=7000;
}
else
{
cout<<" You selected Wrong number "<<endl;
cout<<" Please Enter the correct Numer, Thank you!"<<endl;
}
break;
case 9:
cout<<" You selected Mitsubishi Company "<<endl;
cout<<" 1: Lancer\t\t 2: Outlander\n 3: I-Miev\t\t 4: Outlander Sport "<<endl;
cout<<" \nSelect any one Car = ";
cin>>b;
if (b==1)
{
cout<<" You Selected Lancer Car "<<endl;
cout<<" Speed = 140km/h\n horse power = 148-168\n Rent per Day = 2000 "<<endl;
z=2000;
}
else if (b==2)
{
cout<<" You Selected Outlander Car "<<endl;
cout<<" Speed = 150km/h\n horse power = 166-224\n Rent per Day = 3000 "<<endl;
z=3000;
}
else if (b==3)
{
cout<<" You Selected I-Miev Car "<<endl;
cout<<" Speed = 160km/h\n horse power = 66\n Rent per Day = 1500 "<<endl;
z=1500;
}
else if (b==4)
{
cout<<" You Selected Outlander Sport  Car "<<endl;
cout<<" Speed = 170km/h\n horse power = 148-168\n Rent per Day = 4000 "<<endl;
z=4000;
}
else
{
cout<<" You selected Wrong number "<<endl;
cout<<" Please Enter the correct Numer, Thank you!"<<endl;
}
break;
case 10:
cout<<" You selected Audi Company "<<endl;
cout<<" 1: A8\t\t 2: A3\n 3: Q3\t\t 4: A4\n 5: A5\t\t 6: Q5\n 7: S3\t\t 8: Allroad\n 9: TT\t\t 10: A6\n 11: S4\t\t 12: TTS\n 13: S5\t\t 14: SQ5 "<<endl;
cout<<" \nSelect any one Car = ";
cin>>b;
if (b==1)
{
cout<<" You Selected A8 Car "<<endl;
cout<<" Speed = 100km/h\n horse power = 240-500\n Rent per Day = 2000 "<<endl;
z=2000;
}
else if (b==2)
{
cout<<" You Selected A3 Car "<<endl;
cout<<" Speed = 110km/h\n horse power = 150-220\n Rent per Day = 3000 "<<endl;
z=3000;
}
else if (b==3)
{
cout<<" You Selected Q3 Car "<<endl;
cout<<" Speed = 120km/h\n horse power = 200\n Rent per Day = 3500 "<<endl;
z=3500;
}
else if (b==4)
{
cout<<" You Selected A4 Car "<<endl;
cout<<" Speed = 130km/h\n horse power = 220\n Rent per Day = 4000 "<<endl;
z=4000;
}
else if (b==5)
{
cout<<" You Selected A5 Car "<<endl;
cout<<" Speed = 140km/h\n horse power = 220\n Rent per Day = 4500 "<<endl;
z=4500;
}
else if (b==6)
{
cout<<" You Selected Q5 Car "<<endl;
cout<<" Speed = 150km/h\n horse power = 220-272\n Rent per Day = 5000 "<<endl;
z=5000;
}
else if (b==7)
{
cout<<" You Selected S3 Car "<<endl;
cout<<" Speed = 160km/h\n horse power = 292\n Rent per Day = 5500 "<<endl;
z=5500;
}
else if (b==8)
{
cout<<" You Selected Allroad Car "<<endl;
cout<<" Speed = 170km/h\n horse power = 220\n Rent per Day = 6000 "<<endl;
z=6000;
}
else if (b==9)
{
cout<<" You Selected TT Car "<<endl;
cout<<" Speed = 180km/h\n horse power = 220\n Rent per Day = 6500 "<<endl;
z=6500;
}
else if (b==10)
{
cout<<" You Selected A6 Car "<<endl;
cout<<" Speed = 190km/h\n horse power = 240-333\n Rent per Day = 7000 "<<endl;
z=7000;
}
else if (b==11)
{
cout<<" You Selected S4 Car "<<endl;
cout<<" Speed = 200km/h\n horse power = 333\n Rent per Day = 7500 "<<endl;
z=7500;
}
else if (b==12)
{
cout<<" You Selected TTS Car "<<endl;
cout<<" Speed = 210km/h\n horse power = 292\n Rent per Day = 8000 "<<endl;
z=8000;
}
else if (b==13)
{
cout<<" You Selected S5 Car "<<endl;
cout<<" Speed = 220km/h\n horse power = 333\n Rent per Day = 9000 "<<endl;
z=9000;
}
else if (b==14)
{
cout<<" You Selected SQ5 Car "<<endl;
cout<<" Speed = 230km/h\n horse power = 354\n Rent per Day = 10000 "<<endl;
z=10000;
}
else
{
cout<<" You selected Wrong number "<<endl;
cout<<" Please Enter the correct Numer, Thank you!"<<endl;
}
break;
}
cout<<"\t\t\tYou Selected a Car \n\n";
if (b==1 || b==2 || b==3 || b==4 || b==5 || b==6 || b==7 || b==8 || b==9 || b==10 || b==11 || b==12 || b==13 || b==14)
{
key();
getch();
clrscr();
rent();
char str[6][30],ad;
cout<<"\n\t\tI can provide this car but after some other conditions"<<endl;
cout<<"\n\t\tEnter the costomer name = ";
gets(str[0]);
cout<<"\n\t\tEnter Costomer CNIC Number = _____-_______-_\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b";
gets(str[1]);
cout<<"\n\t\tEnter the one Referance name = ";
gets(str[2]);
cout<<"\n\t\tEnter the Referance CNIC Number = _____-_______-_\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b";
gets(str[3]);
cout<<"\n\t\tEnter the Current Date = __/__/____\b\b\b\b\b\b\b\b\b\b";
gets(str[4]);
cout<<"\n\t\tEnter the Return Date = __/__/____\b\b\b\b\b\b\b\b\b\b";
gets(str[5]);
key();
getch();
clrscr();
rent();
cout<<"\n\t\tRent per day Rs. "<<z<<endl;
cout<<"\n\t\tHow many days = ";
cin>>f;
g=z*f;
cout<<"\n\t\tYour amount Rs. "<<g<<endl;
if(f>=30)
{
c=(g/100)*10;
c=g-c;
cout<<"\n\t\tYour total Amount Rs. "<<c<<" (10 % Discount)"<<endl;
}
else if(f>=60)
{
c=(g/100)*15;
c=g-c;
cout<<"\n\t\tYour total Amount Rs. "<<c<<" (15 % Discount)"<<endl;
}
else if(f>=90)
{
c=(g/100)*20;
c=g-c;
cout<<"\n\t\tYour total Amount Rs. "<<c<<" (20 % Discount)"<<endl;
}
else
{
cout<<"\n\t\tYour total Amount Rs. "<<g<<" (0 % Discount)"<<endl;
}
cout<<"\n\t\tIf you need drive (You pay 500 per day)\n\t\tPress Y for Yes\n\t\tPress N for No"<<endl;
cout<<"\n\t\tSelect any one option = ";
cin>>ad;
if (ad=='y')
{
h=f*500;
i=h+g;
cout<<"\n\t\tYour Total Amount Rs. "<<i<<endl;
}
else
{
cout<<"\n\t\tYour Total Amount Rs. "<<g<<endl;
}
cout<<"\n\t\tBest of Luck\n\t\tHave a Nice Drive\n\t\tThanks For Coming Here";
}
else
{
cout<<"\n\t\tYou Select Wrong Number ";
}
}
else
{
cout<<"\n\t\tYou Select Wrong Number ";
}
getch();
}

void rent(void)
{
cout<<"\n\t\t\t-------------------"<<endl;
cout<<"\t\t\t Rental car system"<<endl;
cout<<"\t\t\t-------------------"<<endl;
}

void key(void)
{
cout<<"\n\n\t\t\t---------------------------"<<endl;
cout<<"\t\t\t Press any key to continue"<<endl;
cout<<"\t\t\t---------------------------"<<endl;
}

--------------------------------------------------------------------------------------------------------------

Download CPP File:



Voting System in C++ - Mini Project

At the end you can download cpp file of this project.

Code in C++ :

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
#include<string.h>
char cr[50][50],voter[100][50];
int crv[5],i,j;
void name();
void vote();
void print();
void main(void)
{
clrscr();
cout<<"\n\t\tVOTEING FOR CR\n\n";
cout<<"How many CR candidates = ";
cin>>i;
name();
l:
clrscr();
cout<<"\n\t\tVOTEING\n\n";
print();
vote();
cout<<"\n\n\nMore Votes???\nYES\tNO";
char g=getch();
if(g=='y')
{
goto l;
}
else if(g=='n')
{
for(j=1;j<=i;j++)
{
cout<<"\nvote for "<<cr[j]<<" is "<<crv[j];
}
}
getch();
}
void name()
{
for(int a=1;a<=i;a++)
{
cout<<"\t\tEnter CR Candidates Name= "<<a<<" ";
gets(cr[a]);
strupr(cr[a]);
}
}
void print()
{
for(int a=1;a<=i;a++)
{
cout<<"For "<<cr[a]<<" Press "<<a<<" "<<endl;
}
}
void vote()
{
char x;
x=getch();
switch(i)
{
case 2:
if(x=='1')
{
crv[1]++;
cout<<"thank you";
}
else if(x=='2')
{
crv[2]++;
cout<<"thank you";
}
else
{
cout<<"Wrong Entery Enter Again";
}
break;
case 3:
if(x=='1')
{
crv[1]++;
cout<<"thank you";
}
else if(x=='2')
{
crv[2]++;
cout<<"thank you";
}
else if(x=='3')
{
crv[3]++;
cout<<"thank you";
}
else
{
cout<<"Wrong Entery Enter Again";
}
break;
case 4:
if(x=='1')
{
crv[1]++;
cout<<"thank you";
}
else if(x=='2')
{
crv[2]++;
cout<<"thank you";
}
else if(x=='3')
{
crv[3]++;
cout<<"thank you";
}
else if(x=='4')
{
crv[4]++;
cout<<"thank you";
}
else
{
cout<<"Wrong Entery Enter Again";
}
break;
case 5:
if(x=='1')
{
crv[1]++;
cout<<"thank you";
}
else if(x=='2')
{
crv[2]++;
cout<<"thank you";
}
else if(x=='3')
{
crv[3]++;
cout<<"thank you";
}
else if(x=='4')
{
crv[4]++;
cout<<"thank you";
}
else if(x=='5')
{
crv[5]++;
cout<<"thank you";
}
else
{
cout<<"Wrong Entery Enter Again";
}
break;
}
}

---------------------------------------------------------------------------------------------------------------

Download CPP File:



12th Physics Solved Numerical Download

Download Notes:

Chapter #12 =>   Download

Chapter #13 =>   Download

Chapter #14 =>   Download

Chapter #15 =>   Download

Chapter #16 =>   Download

Chapter #18 =>   Download

Chapter #20 =>   Download


Download Full Book Solved Numerical


11th Physics Solved Numerical Download

Download Notes:

Chapter #1 =>   Download

Chapter #2 =>   Download

Chapter #3 =>   Download

Chapter #4 =>   Download

Chapter #5 =>   Download

Chapter #6 =>   Download

Chapter #7 =>   Download

Chapter #8 =>   Download

Chapter #9 =>   Download

Chapter #10 =>   Download

Chapter #11 =>   Download

Download Full Book Solved Numerical