Helo guys.
How can i write a program that allows a user to enter a size of pizza and then print the price for that size.
Example: if a user enters size ''s'' then it should display the price stored under ''s''
Depends on which programming language you are using but logic is essentially the same for all:
'Initialize Variables
Base_Type = Character ' (S) Small, (M) Medium, (L) Large
Base_Price = number 'Base Price
Top_Num = number 'number of toppings
Sub-Total = number 'Base Price + Tax
:Startover:
'Get input
Input " Pizza Size (S,M or L)" ,Base_Type
Input "Number of Toppings" , Top_Num
If Base_Type = "S" then Base_Price = 8.50
If base_Type = "M" then Base_Price = 10.50
If Base_Type = "L" then Base_Price = 12.50
if Base_Type not equal to "S" or "M" or "L" then goto Startover
Tax = .07*(Base_Price+(Top_Num *.5 -.5))