Monday, October 10, 2011

#include

#include

int choice,quantity,Bill,cash,ans;

char option;

int main()

{

printf("\nValue Meal");

printf("\n1.] Burger Fries w/ Drinks 59.00");

printf("\n1.] Hotdog w/ Drinks 59.00");

printf("\nEnter Choice: ");

scanf("%d",&choice);

switch (choice)

{

case 1:

printf("Enter Quantity: ");

scanf("%d",&quantity);

printf("\nUpgrade [Y/N]: ");

scanf("%s",&option);

if (option == 'y')

{

Bill = quantity * 59 + 15;

printf("\nYour total Bill is %d",Bill);

printf("\nEnter Cash: ");

scanf("%d",&cash);

ans = cash - Bill;

printf("Your change is %d",ans);

}

if (option == 'n')

{

Bill = quantity * 59;

printf("\nYour total Bill is %d :",Bill);

printf("\nEnter Cash: ");

scanf("%d",&cash);

ans = cash - Bill;

printf("Your change is %d", ans);

break;

case 2:

printf("Enter Quantity: ");

scanf("%d",&quantity);

printf("\nUpgrade [Y/N]: ");

scanf("%s",&option);

if (option == 'y')

{

Bill = quantity * 59 + 15;

printf("\nYour total Bill is %d",Bill);

printf("\nEnter Cash: ");

scanf("%d",&cash);

ans = cash - Bill;

printf("Your change is %d",ans);

}

if (option == 'n')

{

Bill = quantity * 59;

printf("\nYour total Bill is %d :",Bill);

printf("\nEnter Cash: ");

scanf("%d",&cash);

ans = cash - Bill;

printf("Your change is %d", ans);

break;

}

}

}

getch();

return 0;

}

No comments:

Followers

Visitor

free counters

FEEDJIT Live Traffic Feed