A high-altitude research balloon has several helium pressure chambers monitored by automated sensors. If a chamber's pressure falls outside the safe working range, the flight control system must immediately log a critical warning.
SET chamberPressures TO [100, 85, 120, 95, 70, 115, 130, 90]
An example output for the dataset above is shown:
Chamber 2 is critical: 120 kPa
Chamber 4 is critical: 70 kPa
Chamber 6 is critical: 130 kPa
Write an algorithm to display critical warnings for any faulty chambers. Use pseudocode or a programming language with which you are familiar.
50 exam-style questions on Edexcel GCSE Computer Science Constructs, covering Structural components of programs and Writing programs with control constructs. Each one has a worked solution and a mark scheme showing where the marks go.