Yukihiro Rubio
Forum Veteran
- Joined
- Sep 17, 2018
- Posts
- 780
- Solutions
- 4
- Reaction
- 5,015
- Points
- 889
- Age
- 21
[1] Shirt
[2] Shoes
Enter Your Choice: 1
Enter Color of the Shirt: White (w) = 150 , Black (b) = 200: w
Your Choose White!!
Enter Quantity: 5
add to cart or buy (c/b)?: c
Order is added to cart
==========================
[1] Shirt
[2] Shoes
Enter Your Choice: 1
Enter Color of the Shirt: White (w) = 150 , Black (b) = 200: b
Your Choose Black!!
Enter Quantity: 5
add to cart or buy (c/b)?: b
Quantity is: 5
Color: Black
The Total is: 1000
Congrats! You'll get 10% discount on total Shopping amount
You've to Pay Only: 900
Note: color should be fix to w and b. if enter other character tell the user that he input invalid color code.
Note: if the total is greater than equal to 1000 give him a discount of 10% if the total is less than 1000 give him 5% discount
formula:
Variable = (variable*10)/100;
variable = variable-variable;
*****************************************************
choice number 2 shoes
[1] Shirt
[2] Shoes..... 300
Enter Your Choice: 2
We have only 1 pair of shoes, Proceed (y/n)? y
Enter Shoe Details...
Enter Color ( white , Black , Purple, Pink): white ( JUST INPUT. NO ELS)
Enter Size (S, M, L, XL): s ( JUST INPUT. NO ELSE)
Price is: 300
Quantity: 15
The total is: 4500
Enter your Money: 4500
Change is: 0
Your are eligible in our discount 10%, avail (y/n)?: y
Total amount to be ρáíd is: 4050
Note: money should have a feature that tells the money is insufficient.
Note: discount should be apply only when the amount is greater than or equal to 1500, otherwise they cant avail it.
NOTE: ALL THE OPTIONS THAT ASK FOR THE USER SHOULD HAVE AN ELSE STATEMENT THAT TELLS THE USER INVALID.
Formula:
variable = (variable *10 )/100;
variable = variable - variable;
[2] Shoes
Enter Your Choice: 1
Enter Color of the Shirt: White (w) = 150 , Black (b) = 200: w
Your Choose White!!
Enter Quantity: 5
add to cart or buy (c/b)?: c
Order is added to cart
==========================
[1] Shirt
[2] Shoes
Enter Your Choice: 1
Enter Color of the Shirt: White (w) = 150 , Black (b) = 200: b
Your Choose Black!!
Enter Quantity: 5
add to cart or buy (c/b)?: b
Quantity is: 5
Color: Black
The Total is: 1000
Congrats! You'll get 10% discount on total Shopping amount
You've to Pay Only: 900
Note: color should be fix to w and b. if enter other character tell the user that he input invalid color code.
Note: if the total is greater than equal to 1000 give him a discount of 10% if the total is less than 1000 give him 5% discount
formula:
Variable = (variable*10)/100;
variable = variable-variable;
*****************************************************
choice number 2 shoes
[1] Shirt
[2] Shoes..... 300
Enter Your Choice: 2
We have only 1 pair of shoes, Proceed (y/n)? y
Enter Shoe Details...
Enter Color ( white , Black , Purple, Pink): white ( JUST INPUT. NO ELS)
Enter Size (S, M, L, XL): s ( JUST INPUT. NO ELSE)
Price is: 300
Quantity: 15
The total is: 4500
Enter your Money: 4500
Change is: 0
Your are eligible in our discount 10%, avail (y/n)?: y
Total amount to be ρáíd is: 4050
Note: money should have a feature that tells the money is insufficient.
Note: discount should be apply only when the amount is greater than or equal to 1500, otherwise they cant avail it.
NOTE: ALL THE OPTIONS THAT ASK FOR THE USER SHOULD HAVE AN ELSE STATEMENT THAT TELLS THE USER INVALID.
Formula:
variable = (variable *10 )/100;
variable = variable - variable;