#include<stdio.h>
#include<conio.h>
#define s scanf
#define p printf
int main()
{
int price, x;
p("Choices:\n");
p("1.] XL\n");
p("2.] L\n");
p("Enter T-Shirt Size: ");
s("%d", &x);
switch(x)
{
case 1:
p("Enter Price: ");
s("%d", &price);
if(price>= 500)
p("You Have Discount 100!");
break;
case 2:
p("Enter Price: ");
s("%d", &price);
if(price >= 400)
p("You have Discount 50!");
break;
default:
p("thank you!");
break;
}
getch();
return 0;
}
No comments:
Post a Comment