An algorithm is shown in the pseudocode below.
1 temp ← USERINPUT
2 IF NOT(temp <= 18) OR temp > 30 THEN
3 OUTPUT "Heating Off"
4 ELSEIF temp > 10 AND temp <= 18 THEN
5 OUTPUT "Mild"
6 ELSE
7 OUTPUT "Cold"
8 ENDIF
Rewrite line 2 from this algorithm without using the NOT operator.
The algorithm must still have the same functionality.
Practise AQA GCSE Computer Science Boolean operations in a programming language with exam-style questions for GCSE Computer Science. 19 questions, matched to the AQA GCSE Computer Science (8525) specification and written in Paper 1 and Paper 2 style. Every question includes a full worked solution and mark scheme, so you can see where marks are awarded rather than just whether you got the answer right.