Petrol Pump Management
Petrol Pump Management
#include<stdio.h>
#include<string.h>
main()
{
printf("\t PSO Petrol Pump\n");
printf("\t __________________");
printf("\n \n\n");
printf("___________________________________________________________________________\n");
int a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v;
float w,x,y,z;
char ch;
printf("\t \t *Press 1 for PETROL \n");
printf("\t \t *Press 2 for DIESEL \n");
printf("\t \t *Press 3 for CNG \n");
printf("\t \t *Press 4 for MART\n");
printf("\n");
scanf("%d",&a);
switch(a)
{
case 1:
printf("\n\n");
printf("1 litre petrol =Rs 75.00\n");
printf("How much litre You Want\n");
printf("\n");
scanf("%d",&b);
z=b*75.00;
printf("_______________________________________________________________________________
_\n");
printf("Your Bill is %f\n",z);
printf("_______________________________________________________________________________
_\n");
printf("How Would you like pay\n");
printf("\t *Press 1 for cash\n");
printf("\t *press 2 for card\n");
scanf("%d",&s);
if(s==1)
{
printf("\n");
printf("Payment Paid\n");
printf("Thanyou for coming\n");
}
else if(s==2)
{
printf("Swipe your card\n");
printf("\n");
printf("payment paid\n");
printf("thanks for coming\n");
}
break;
case 2:
printf("Price of Diesel is RS 90.00 per litre\n");
printf("How much litre of diesel you want\n");
scanf("%d",&c);
y=c*90.00;
printf("_______________________________________________________________________________
__\n");
printf("Your Bill Is %f\n",y);
printf("_______________________________________________________________________________
__\n");
printf("How Would You Like To Pay\n");
printf("*Press 1 for CASH\n *Press 2 for CARD\n");
scanf("%d",&d);
if (d==1)
printf("Thanks For Coming\n");
else if(d==2){
printf("Swipe Your Card\n");
printf("Payment Paid\n");
break;
}
case 3:
scanf("%d",&f);
if(f==1)
printf("Thanks For Coming\n");
else if(f==2)
{
printf("Swipe Your Card\n");
printf("Payment Paid\n");
printf("Thanks For Coming\n");
break;
}
case 4:
printf("\t \tWelcome To PSO MART\n");
printf("\t \t---------------------\n");
printf("\n\n\n");
printf("We Have Biscuits,JUICE,CHIPS,DRINKS\n");
printf("\n");
printf("\t *Press 1 for Cold drinks\n");
printf("\t *Press 2 For Juice\n");
printf("\t *Press 3 For Biscuits\n");
printf("\t *Press 4 For Chips\n");
printf("_______________________________________________________________________________
_\n");
scanf("%d",&k);
if(k==1)
{
printf("1 Cold Drink = RS 50\n");
printf("How many cold drinks you want\n");
scanf("%d",&m);
printf("\n\n\n");
n=m*50;
printf("_______________________________________________________________________________
\n");
printf("your bill is %d\n",n);
printf("_______________________________________________________________________________
\n");
printf("how would you want to pay\n");
printf("\n\n");
printf(" *press 1 for cash\n");
printf(" *press 2 for card\n");
scanf("%d",&r);
printf("\n\n\n");
if(r==1)
{
printf("Thankyou for your Payment\n");
printf("Please Visit Again\n");
}
else if(r==2)
{
printf("Swipe your Card\n");
printf("Payment paid\n");
printf("Thankyou For Your Payment\n");
printf("Please Visit Again\n");
}
}
else if(k==2){
printf("1 juice=RS 30\n");
printf("How many juice you want?\n");
scanf("%d",&l);
m=l*30;
printf("_______________________________________________________________________________
\n");
printf("Your Bill Is %d\n",m);
printf("_______________________________________________________________________________
_\n");
printf("\n\n");
printf("how would you like to pay\n");
printf("*press 1 for cash\n");
printf("*press 2 for card\n");
printf("\n");
scanf("%d",&t);
if(t==1)
{
printf("\n");
printf("THANKS FOR YOUR PAYMENT\n");
printf("PLEASE VISIT AGAIN\n");
}
else if(t==2)
{
printf("\n");
printf("Swipe your card\n");
printf("payment paid\n");
printf("Please visit again\n");
}
}
else if(k==3){
printf("1 Biscuits=RS 20\n");
printf("How many Biscuits you want?\n");
scanf("%d",&n);
o=n*20;
printf("_____________________________________________________________________________\n
");
printf("Your Bill Is %d\n",o);
printf("_____________________________________________________________________________\n
");
printf("How would you like to pay\n");
printf("*press 1 for cash\n");
printf("*press 2 for card\n");
printf("\n");
scanf("%d",&u);
if(u==1)
{
printf("\n");
printf("thanks for your payment\n");
printf("please visit again\n");
}
else if(u=2)
{
printf("\n");
printf("swipe your card\n");
printf("payment paid\n");
printf("plaese visit again\n");
}
}
else if(k==4){
printf("1 chips = RS 20\n");
printf("How many chips you want\n");
scanf("%d",&p);
q=p*20;
printf("_______________________________________________________________________________
\n");
printf("Your Bill Is %d\n",q);
printf("_______________________________________________________________________________
\n");
printf("\n\n");
printf("how would you like to pay\n");
printf("*press 1 for cash\n");
printf("*press 2 for card\n");
printf("\n");
scanf("%d",&v);
if(v==1)
{
printf("\n");
printf("thanks for your payment\n");
printf("please visit again\n");
}
else if(v==2)
printf("\n");
printf("swipe your card\n");
printf("payment paid\n");
printf("please visit again");
}
else if(k==5)
{
printf("\t \t THANKYOU FOR COMING\n");
break;
}