To solve this problem, we need to write pseudocode that processes a beverage order by accepting an order code and quantity, calculating the total charges, and then printing the order details. This involves basic input and output operations along with a control structure to decide the pricing based on the input.
Here is the pseudocode to accomplish this task:
START
// Define the beverage prices SET coffee_price = 2.00 SET tea_price = 1.50 SET milo_price = 4.00
// Prompt the user for input PRINT "BEVERAGE CODE: " INPUT beverage_code
PRINT "QUANTITY: " INPUT quantity
// Initialize variables for order details SET beverage_name = "" SET charges = 0.00
// Determine the beverage and charges based on the code IF beverage_code == 1 THEN SET beverage_name = "COFFEE" SET charges = coffee_price * quantity ELSE IF beverage_code == 2 THEN SET beverage_name = "TEA" SET charges = tea_price * quantity ELSE IF beverage_code == 3 THEN SET beverage_name = "MILO" SET charges = milo_price * quantity ELSE PRINT "Invalid beverage code" STOP END IF
// Print the order and charges PRINT "YOUR ORDER: " + beverage_name PRINT "CHARGES: RM" + charges
END ;