Draw a flow diagram for an algorithm which calculates how much money a student will need per week to buy a meal and two drinks each weekday. The user should be prompted to enter how much a meal costs, how much a drink costs, and then calculate and display the total required.
Declare Real mealCosts
Declare Real drinkCosts
Declare Real totalRequired
Display "Enter how much a meal costs: "
Input mealCosts
Display "Enter how much a drink costs: "
Input drinkCosts
Set totalRequired = mealCosts + drinkCosts
Display "The total required: ", totalRequired
Comments
Leave a comment