# how to add 12% vat and 20% discount on sr citizen



## louie45 (Oct 3, 2011)

how to add 12% vat and 20% discount on senior citizen
i dont know what code to add,please help me!!




```
#include<stdio.h>
#include<conio.h>

apmenu()
{
char choice;
int x, money1, diff;
apmenu:
clrscr();
printf("Please enter the number of your order:\n");
printf("[1] Corn & Tomato Soup\n");
printf("[2] Crab & Corn Soup\n");
printf("[3] Garlic Soup\n");
printf("[4] Bean Soup w/Pasta\n");
printf("");
printf("[5] Back to main menu\n");
scanf("%s",&choice);
switch(choice)
{
case '1':{goto order1;}
case '2':{goto order2;}
case '3':{goto order3;}
case '4':{goto order4;}
case '5':main();
default:{goto apmenu;}
}
order1:clrscr();printf("*Your order is:\n");printf(" Corn & Tomato Soup..............100php\n");goto end;
order2:clrscr();printf("*Your order is:\n");printf(" Crab & Corn Soup...............150php\n");goto end;
order3:clrscr();printf("*Your order is:\n");printf(" Garlic Soup...............75php\n");goto end;
order4:clrscr();printf("*Your order is:\n");printf(" Bean Soup w/Pasta....100php\n");goto end;

end:

printf("Please enter the amount of your money:\n");
scanf("%d",&money1);

if(choice=='1')
diff=money1-100;

if(choice=='2')
diff=money1-150;

if(choice=='3')
diff=money1-75;

if(choice=='4')
diff=money1-100;

printf("your change is %d\n",diff);


printf("Do you want to order again?(Y/N)[ ]\n");
scanf("%s",&choice);
if((choice=='N')||

(choice=='n'))
{clrscr();printf("Please wait while we prepare the food you ordered.");printf("");sleep(3);thankyou();}
else if((choice=='Y')||

(choice=='y'))
{main();}
else
{goto end;}
return(0);
}

mdmenu()
{
char choice;
int x, money1, diff;
mdmenu:
clrscr();
printf("Please enter the number of your choice:\n");
printf("[1] Fish Fillet\n");
printf("[2] Stuffed Squid\n");
printf("[3] Roast Pork Loin\n");
printf("[4] Burger Steak w/Onion\n");
printf("");
printf("[5] Back to main menu\n");
scanf("%s",&choice);
switch(choice)
{
case '1':{goto order5;}
case '2':{goto order6;}
case '3':{goto order7;}
case '4':{goto order8;}
case '5':main();
default:{goto mdmenu;}
}
order5:clrscr();printf("*Your order is:\n");printf("Fish Fillet.....150php\n");goto end;
order6:clrscr();printf("*Your order is:\n");printf("Stuffed Squid.............175php\n");goto end;
order7:clrscr();printf("*Your order is:\n");printf("Roast Pork Loin........................250php\n");goto end;
order8:clrscr();printf("*Your order is:\n");printf("Burger Steak w/Onion..........150php\n");goto end;
end:

printf("Please enter the amount of your money:");
scanf("%d",&money1);

if(choice=='1')
diff=money1-150;

if(choice=='2')
diff=money1-175;

if(choice=='3')
diff=money1-250;

if(choice=='4')
diff=money1-150;

printf("your change is %d\n",diff);



printf("Do you want to order again?(Y/N)[ ]\n");
scanf("%s",&choice);
if((choice=='N')||

(choice=='n'))
{clrscr();printf("Please wait while we prepare the food you ordered.");printf("");sleep(3);thankyou();}
else if((choice=='Y')||

(choice=='y'))
{main();}
else
{goto end;}
return(0);
}

bemenu()
{
char choice;
int x, money1, diff;
bemenu:
clrscr();
printf("Please enter the number of your choice:\n");
printf("[1] Fruit Juice\n");
printf("[2] Softdrinks\n");
printf("[3] Iced Tea\n");
printf("[4] Rootbeer\n");
printf("");
printf("[5] Back to main menu\n.");
scanf("%s",&choice);
switch(choice)
{
case '1':{goto order9;}
case '2':{goto order10;}
case '3':{goto order11;}
case '4':{goto order12;}
case '5':main();
default:{goto bemenu;}
}
order9:clrscr();printf("*Your order is:");printf("Fruit Juice.................50php\n");goto end;
order10:clrscr();printf("*Your order is:");printf("Softdrinks.............35php\n");goto end;
order11:clrscr();printf("*Your order is:");printf(" Iced Tea............25php\n");goto end;
order12:clrscr();printf("*Your order is:");printf(" Rootbeer...........25php\n");goto end;
end:

printf("Please enter the amount of your money:");
scanf("%d",&money1);

if(choice=='1')
diff=money1-50;

if(choice=='2')
diff=money1-35;

if(choice=='3')
diff=money1-25;

if(choice=='4')
diff=money1-25;

printf("your change is %d\n",diff);



printf("Do you want to order again?(Y/N)[ ]\n");
scanf("%s",&choice);
if((choice=='N')||

(choice=='n'))
{clrscr();printf("Please wait while we prepare the food you ordered.");printf("");sleep(3);thankyou();}
else if((choice=='Y')||

(choice=='y'))
{main();}
else
{goto end;}
return(0);
}

vemenu()
{
char choice;
int x, money1, diff;
vemenu:
clrscr();
printf("Please enter the number of your choice:");
printf("[1] Buko Salad\n");
printf("[2] Macaroni Salad\n");
printf("[3] Potato Salad\n");
printf("[4] Fruit Salad\n");
printf("");
printf("[5] Back to main.");
scanf("%s",&choice);
switch(choice)
{
case '1':{goto order13;}
case '2':{goto order14;}
case '3':{goto order15;}
case '4':{goto order16;}
case '5':main();
default:{goto vemenu;}
}
order13:clrscr();printf("*Your order is:");printf("Buko Salad..........45php\n");goto end;
order14:clrscr();printf("*Your order is:");printf("Macaroni Salad...........45php\n");goto end;
order15:clrscr();printf("*Your order is:");printf("Potato Salad...............45php\n");goto end;
order16:clrscr();printf("*Your order is:");printf("Fruit Salad...............50php\n");goto end;
end:

printf("Please enter the amount of your money:");
scanf("%d",&money1);

if(choice=='1')
diff=money1-45;

if(choice=='2')
diff=money1-45;

if(choice=='3')
diff=money1-45;

if(choice=='4')
diff=money1-50;

printf("your change is %d\n",diff);

printf("Do you want to order again?(Y/N)[ ]\n");
scanf("%s",&choice);
if((choice=='N')||

(choice=='n'))
{clrscr();printf("Please wait while we prepare the food you ordered.");printf("");sleep(3);thankyou();}
else if((choice=='Y')||

(choice=='y'))
{main();}
else
{goto end;}
return(0);
}

demenu()
{
char choice;
int x;
demenu:
clrscr();
printf("Please enter the number of your choice:\n");
printf("[1] Coco Mango Royale\n");
printf("[2] Chocolate Ice Cream\n");
printf("[3] Leche Flan\n");
printf("[4] Strawberry Pie\n");
printf("");
printf("[5] Back to main.\n");
scanf("%s",&choice);
switch(choice)
{
case '1':{goto order17;}
case '2':{goto order18;}
case '3':{goto order19;}
case '4':{goto order20;}
case '5':main();
default:{goto demenu;}
}
order17:clrscr();printf("*Your order is:");printf("Coco Mango Royale...........85php\n");goto end;
order18:clrscr();printf("*Your order is:");printf("Chocolate Ice Cream.................50php\n");goto end;
order19:clrscr();printf("*Your order is:");printf("Leche Flan..............30php\n");goto end;
order20:clrscr();printf("*Your order is:");printf("Strawberry Pie...........75php\n");goto end;

end:
printf("Do you want to order again?(Y/N)[ ]\n");
scanf("%s",&choice);
if((choice=='N')||

(choice=='n'))
{clrscr();printf("Please wait while we prepare the food you ordered.");printf("");sleep(3);thankyou();}
else if((choice=='Y')||

(choice=='y'))
{main();}
else
{goto end;}
return(0);
}


main()
{
char choice;
int x;
mamenu:
clrscr();
printf("**********WELCOME TO JOLLYBEIBS**********\n");
printf("*Please enter the number that corresponds\n");
printf("to the type of food that you want to order*[ ]\n");
printf("1. Soup\n");
printf("2. Main Dish\n");
printf("3. Beverages\n");
printf("4. Salads\n");
printf("5. Desserts\n");
scanf("%s",&choice);
switch(choice)
{
case '1':{apmenu();}
case '2':{mdmenu();}
case '3':{bemenu();}
case '4':{vemenu();}
case '5':{demenu();}
default:{goto mamenu;}
}
}

thankyou()
{
int x;
clrscr();
printf("THANK YOU VERY MUCH PLEASE COME AGAIN!!!");
getch();
exit(0);
return(0);
}
```


----------



## Laxer (Dec 28, 2010)

Once you get to this part of the program:


```
scanf("%d",&money1);

if(choice=='1')
diff=money1-150;

if(choice=='2')
diff=money1-175;

if(choice=='3')
diff=money1-250;

if(choice=='4')
diff=money1-150;
```
I would ask the user their age and if they have ever served in the military.

Then I would add a few more ifs to accommodate the discounted price.

-Moved to programming-


----------

