------------------------------------Welcome to Our Mall-----------------------------------------------
#include<stdio.h>
#include<conio.h>
void main()
{
double amount=0;char ch1,ch2,ch3;char c;int c1;char yn1;int cf=0;
int q,q1,q2,q3,q4,q5,q6,q7,q8,q9,q10,q11,q12,q13,q14,q15,q16,q17,q18,q19=0;
double s1,s2,s3,s4,s5,s6,s7,s8,s9,s10,s11,s12,s13,s14,s15,s16,s17,s18,s19=0;
clrscr();
printf("\n*****************************\n");
printf("\nWELCOME to our Shopping Mall.\n");
printf("\n*****************************");
do
{
fflush(stdin);
printf("\nWhich section would you like to enter ?");
printf("\n\n1.Clothing");
printf("\n2.The Cricket Shop");
printf("\n3.Xtreme Gadgets ");
scanf("%c",&ch1);
switch(ch1)
{
case '1':
s1=s2=s3=s16=0;q=q1=q2=q3=q16=0;amount=0;
do
{
s1=s2=s3=s16=0;
fflush(stdin);
printf("\n***WELCOME TO CLOTHING SECTION***\n");
printf("\nWhat would you like to buy ?");
printf("\n1.Shirt [Rs.999/-]");
printf("\n2.Jeans [Rs.749/-]");
printf("\n3.T-Shirt [Rs.799/-]");
printf("\n4.Pair of Shoes [Rs.1,400/-] ");
scanf("%d",&c1);
if(c1==1)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s1=s1+(q*999);
q1=q1+q;
amount=amount+s1;
}
else if(c1==2)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s2=s2+q*749;
q2=q2+q;
amount=amount+s2;
}
else if(c1==3)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s3=s3+q*799;
q3=q3+q;
amount=amount+s3;
}
else if(c1==4)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s16=s16+q*1400;
q16=q16+q;
amount=amount+s16;
}
else
{
printf("\nSorry, Invalid Choice!");
}
yn1=' ';
while(yn1!='Y' && yn1!='y' && yn1!='N' && yn1!='n')
{
printf("\nDo you want to buy anything else (Y/N) ?\n");
fflush(stdin);
scanf("%c",&yn1);
if(yn1!='Y'&&yn1!='y'&&yn1!='N'&&yn1!='n')
{
printf("\nSorry! Invalid Choice...Try Again!");
}
}
if(yn1=='N'||yn1=='n')
{
printf("Press 1 to CONFIRM your Order OR Press 0 to CANCEL ");
scanf("%d",&cf);
if(cf==1)
{
amount=amount+(((12.5)*amount)/100);
printf("\n**********BILL**********\n");
if(q1>0)
printf("\nNo. of Shirts = %d",q1);
if(q2>0)
printf("\nNo. of Jeans = %d",q2);
if(q3>0)
printf("\nNo. of T-Shirts = %d",q3);
if(q16>0)
printf("\nNo. of Pairs of Shoes = %d",q16);
printf("\n\nYour total amount is = %lf (Incl. of All Taxes)\n\nThankyou...We hope you visit us soon...",amount);
}
else if(cf==0)
{
printf("\nThankyou...We hope you visit us soon...");
}
}
}
while(yn1=='Y' || yn1=='y');
break;
case '2':
s9=s10=s11=s12=s13=s14=s15=0;q=q9=q10=q11=q12=q13=q14=q15=0;amount=0;
do
{
s9=s10=s11=s12=s13=s14=s15=0;
fflush(stdin);
printf("\n***WELCOME TO THE CRICKET SHOP***\n");
printf("\nWhat would you like to buy ?");
printf("\n1.Kookaburra Bat [Rs.1,500/-]");
printf("\n2.SG Bat [Rs.1,200/-]");
printf("\n3.Kookaburra Ball [Rs.300/-]");
printf("\n4.SG Ball [Rs.280/-]");
printf("\n5.Stumps Set [Rs.700/-]");
printf("\n6.Batting / Wicket-Keeping Gloves [Rs.1,100/-]");
printf("\n7.Full Cricket Kit [Rs.3,500/-] ");
scanf("%d",&c1);
if(c1==1)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s9=s9+(q*1500);
q9=q9+q;
amount=amount+s9;
}
else if(c1==2)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s10=s10+q*1200;
q10=q10+q;
amount=amount+s10;
}
else if(c1==3)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s11=s11+q*300;
q11=q11+q;
amount=amount+s11;
}
else if(c1==4)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s12=s12+q*280;
q12=q12+q;
amount=amount+s12;
}
else if(c1==5)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s13=s13+q*700;
q13=q13+q;
amount=amount+s13;
}
else if(c1==6)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s14=s14+q*1100;
q14=q14+q;
amount=amount+s14;
}
else if(c1==7)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s15=s15+q*3500;
q15=q15+q;
amount=amount+s15;
}
else
{
printf("\nSorry, Invalid Choice!");
}
yn1=' ';
while(yn1!='Y' && yn1!='y' && yn1!='N' && yn1!='n')
{
printf("\nDo you want to buy anything else (Y/N) ?\n");
fflush(stdin);
scanf("%c",&yn1);
if(yn1!='Y'&&yn1!='y'&&yn1!='N'&&yn1!='n')
{
printf("\nSorry! Invalid Choice...Try Again!");
}
}
if(yn1=='N'||yn1=='n')
{
printf("\nPress 1 to CONFIRM your Order OR Press 0 to CANCEL ");
scanf("%d",&cf);
if(cf==1)
{
amount=amount+(((12.5)*amount)/100);
printf("\n**********BILL**********\n");
if(q9>0)
printf("\nNo. of Kookaburra Bats = %d",q9);
if(q10>0)
printf("\nNo. of SG Bats = %d",q10);
if(q11>0)
printf("\nNo. of Kookaburra Balls = %d",q11);
if(q12>0)
printf("\nNo. of SG Balls = %d",q12);
if(q13>0)
printf("\nNo. of Stumps Sets = %d",q13);
if(q14>0)
printf("\nNo. of Batting / Wicket-Keeping Gloves = %d",q14);
if(q15>0)
printf("\nNo. of Full Cricket Kits = %d",q15);
printf("\n\nYour total amount is = %lf (Incl. of All Taxes)\n\nThankyou...We hope you visit us soon...",amount);
}
else if(cf==0)
{
printf("\nThankyou...We hope you visit us soon...");
}
}
}
while(yn1=='y'||yn1=='Y');
break;
case '3':
s4=s5=s6=s7=s8=0;q=q4=q5=q6=q7=q8=q17=q18=q19=0;amount=0;
do
{
s4=s5=s6=s7=s8=0;
fflush(stdin);
printf("\n***WELCOME TO XTREME GADGETS***\n");
printf("\nWhat would you like to buy ?");
printf("\n1.Laptop [Rs.40,000/-]");
printf("\n2.PC [Rs.35,000/-]");
printf("\n3.Tablet [Rs.10,000/-]");
printf("\n4.Mobile Phone [Rs.20,000/-]");
printf("\n5.Television [Rs.50,000/-]");
printf("\n6.Digital Camera [Rs.25,000/-]");
printf("\n7.PlayStation 4 [Rs.30,000/-]");
printf("\n8.XBox 360 [Rs.20,000/-] ");
scanf("%d",&c1);
if(c1==1)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s4=s4+(q*40000);
q4=q4+q;
amount=amount+s4;
}
else if(c1==2)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s5=s5+q*35000;
q5=q5+q;
amount=amount+s5;
}
else if(c1==3)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s6=s6+q*10000;
q6=q6+q;
amount=amount+s6;
}
else if(c1==4)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s7=s7+q*20000;
q7=q7+q;
amount=amount+s7;
}
else if(c1==5)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s8=s8+q*50000;
q8=q8+q;
amount=amount+s8;
}
else if(c1==6)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s17=s17+q*25000;
q17=q17+q;
amount=amount+s17;
}
else if(c1==7)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s18=s18+q*30000;
q18=q18+q;
amount=amount+s18;
}
else if(c1==8)
{
printf("\nEnter Quantity\n");
scanf("%d",&q);
s19=s19+q*20000;
q19=q19+q;
amount=amount+s19;
}
else
{
printf("\nSorry, Invalid Choice!");
}
yn1=' ';
while(yn1!='Y' && yn1!='y' && yn1!='N' && yn1!='n')
{
printf("\nDo you want to buy anything else (Y/N) ?\n");
fflush(stdin);
scanf("%c",&yn1);
if(yn1!='Y'&&yn1!='y'&&yn1!='N'&&yn1!='n')
{
printf("\nSorry! Invalid Choice...Try Again!");
}
}
if(yn1=='N'||yn1=='n')
{
printf("\nPress 1 to CONFIRM your Order OR Press 0 to CANCEL ");
scanf("%d",&cf);
if(cf==1)
{
amount=amount+(((12.5)*amount)/100);
printf("\n**********BILL**********\n");
if(q4>0)
printf("\nNo. of Laptops = %d",q4);
if(q5>0)
printf("\nNo. of PC's = %d",q5);
if(q6>0)
printf("\nNo. of Tablets = %d",q6);
if(q7>0)
printf("\nNo. of Mobile Phones = %d",q7);
if(q8>0)
printf("\nNo. of Televisions = %d",q8);
if(q17>0)
printf("\nNo. of Digital Cameras = %d",q17);
if(q18>0)
printf("\nNo. of PlayStation 4 = %d",q18);
if(q19>0)
printf("\nNo. of XBox 360 = %d",q19);
printf("\n\nYour total amount is = %lf (Incl. of All Taxes)\n\nThankyou...We hope you visit us soon.",amount);
}
else if(cf==0)
{
printf("\nThankyou...We hope you visit us soon...");
}
}
}
while(yn1=='y'||yn1=='Y');
break;
default:
printf("\nInvalid Choice...Please try again...");
}
c=' ';
while(c!='Y' && c!='y' && c!='N' && c!='n')
{
printf("\nDo you want to continue shopping (Y/N) ?\n");
fflush(stdin);
scanf("%c",&c);
if(c!='Y' && c!='y' && c!='N' && c!='n')
{
printf("\nSorry! Invalid Choice...Try Again!");
}
}
if(c=='n'||c=='N')
{
printf("\nThankyou for your visit...Have a nice day...");
}
}
while(c=='Y'||c=='y');
getch();
}