practice for programmers
Logged in as Anonymous Student
254271 Fundamentals - Mini Test 1 (Sec 3 & 4)
A. Welcome to CSIT Cafe
Write a program that outputs "Welcome to CSIT Cafe" followed by a row of 20 dashes (-).
B. Choose your drink
Write a program that reads in a number (1-4) and outputs the name of the drink corresponding to the menu below. If the number is outside the range then output "Unknown".
C. Order processing
Customers write their orders on paper as a list of quantities (see below) which must be relayed to the barista. Write a program to convert a list of 4 quantities into a list of drinks that the barista must produce.
D. Pay for your order
Write a program to generate a receipt for your order. The input is the same as part C.
The prices of the drinks are: Espresso 35 baht, Cappuccino 40 baht, Americano 35 baht, Mocha 45 baht.