Computer Science – 9.2 Algorithms | e-Consult
9.2 Algorithms (1 questions)
Login to see all questions.
Click on a question to view the answer
Pseudo-code:
- Input: Get a list of numbers, 'numbers'.
- Initialization: Set 'largest' to the first element of 'numbers'.
- Iteration:
- For each number 'number' in 'numbers' (starting from the second element):
- Decision: If 'number' is greater than 'largest':
- Update Largest: Set 'largest' to 'number'.
- Output: Display the value of 'largest'.