Page

Petrol Filling Management System In C,C++

#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
double diesel_cost;
double petrol_cost;
double naturalgas_cost;
double litre;
double service_cost;
double total_cost_diesel;
double total_cost_petrol;
double total_cost_naturalgas;
double total_petrol;
double total_diesel;
double total_naturalgas;
double total_amountp;
double total_amountd;
int choice;
cout<<"\n\t\t\t Welcome to Bharat Petroleum";
cout<<"\n Total amount of petrol received by the seller:";
cin>>total_petrol;
cout<<"\n Total amount of diesel received by the seller:";
cin>>total_diesel;
cout<<"\n Total amount of natural gas received by seller:";
cin>>total_naturalgas;
cout<<"\n Cost of diesel per litre:";
cin>>diesel_cost;
cout<<"\n Cost of petrol per litre:";
cin>>petrol_cost;
cout<<"\n Cost of natural gas per litre:";
cin>>naturalgas_cost;
cout<<"\n Cost of service of vehicle:";
cin>>service_cost;
cout<<"\n\n\n\tWelcome to Bharat petroleum";
cout<<"\n\n Total amount of petrol received by the seller:";
cout<<total_petrol;
cout<<"\n\n Total amount of diesel received by the seller:";
cout<<total_diesel;
cout<<"\n\n Total amount of natural gas recieved by the seller:";
cout<<total_naturalgas;
cout<<"\n\n Cost of diesel per litre is:";
cout<<diesel_cost;
cout<<"\n\n Cost of petrol per litre is:";
cout<<petrol_cost;
cout<<"\n\n Cost of natural gas per litre is:";
cout<<naturalgas_cost;
cout<<"\n\n Cost of service of vehicle is:";
cout<<service_cost;
cout<<"\n\n you have following choices :\n\t 1.Petrol \n\t 2.Diesel \n\t 3.Natural gas\n\t 4.Service of vehicle\n\tenter your choice:";
cin>>choice;
switch(choice)
{
case 1:
cout<<"\n\n Quantity of petrol filled: ";
cin>>litre;
total_cost_petrol=litre*petrol_cost;
cout<<"\n\n Total cost of petrol filled:";
cout<<total_cost_petrol;
break;
case 2:
cout<<"\n\n Quantity of diesel filled:";
cin>>litre;
total_cost_diesel=litre*diesel_cost;
cout<<"\n\n Total cost of diesel filled:";
cout<<total_cost_diesel;
break;
case 3:
cout<<"\n\n Quantity of natural gas filled:";
cin>>litre;
total_cost_naturalgas=litre*naturalgas_cost;
cout<<"\n\n Total cost of natural gas filled:";
cout<<total_cost_naturalgas;
break;
case 4:
cout<<"\n\n Service cost of vehicle:";
cout<<service_cost;
break;
}

cout<<endl;
cout<<"PROGRAMMING DESIGNED BY :"<<endl;
cout<<"sourcecodernp.blogspot.com"<<endl;

getch();
}

No comments:

Post a Comment