Exam Q1 Practice – June 2023

A program is being developed to show the average daily temperature and add up the costs of
buying ice cream.

It displays each temperature stored in an array of temperatures.
It adds up all the ice cream costs entered by the user, until the user enters 0.
It then calculates a discount. When the total cost is over 100.00, the discount is 10%.
Otherwise, the discount is 5%.

Amend the lines at the bottom of the code to give the:
name of a constant used in the program
name of an array used in the program
line number of an initialisation of a variable with a real number
line numbers for a selection construct
line numbers for a repetition construct
line numbers for an iteration construct
line number for an instruction that outputs information to the screen.

Do not add any additional functionality.

Scroll to Top