Computer Science · May / June 2017 · Paper 21 · Question 6
2210
As printed in the paper
The question as text
This flowchart inputs a range of temperatures in degrees Fahrenheit. As each temperature is input, it is compared with the previous highest temperature. If it is higher than the current highest, it replaces the previous highest temperature and then it is converted to degrees Celsius. For ease of calculation, the final step of the Fahrenheit to Celsius conversion has been approximated as division by 2. When –1 is entered, the input process stops and the highest temperature (in both Fahrenheit and Celsius) is output. Is TempF = -1? Is TempF > HighF? No No Yes Yes END HighF -100 HighC -100 INPUT TempF OUTPUT 'The highest temperature is, ', HighF, ' Fahrenheit, ', HighC, ' Celsius.' START HighF TempF HighC (TempF-32)/2 13 Complete the trace table for the input data: 68, 46, 50, 86, 65, 50, 40, 30, –1 HighF HighC TempF OUTPUT [5]
Read automatically from the paper; the printed page above is exact.
Show the answer and mark scheme
Make a free account to save your answers and see your weak topics and ask the AI why a wrong answer is wrong.

