A deep-sea research team wants to analyze the dive depths (in meters) of a submersible. They need a program to track the depths of their research runs.
An operator enters the dive depths one by one. The operator enters 0 when they are finished entering data.
The algorithm must:
Here is a sample execution sequence:
Enter dive depth in meters (0 to quit): 4500.5
Enter dive depth in meters (0 to quit): -15.0
Error: Invalid depth entered.
Enter dive depth in meters (0 to quit): 13500.0
Error: Invalid depth entered.
Enter dive depth in meters (0 to quit): 150.2
Enter dive depth in meters (0 to quit): 8200.0
Enter dive depth in meters (0 to quit): 0
Write an algorithm to meet these requirements.
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.