Pseudocode Compiler
Practice

Array Maximum

MEDIUMArrays

Read an integer N (1 ≤ N ≤ 10), then read N integers. Output the largest value.

Input: N on the first line, then N integers one per line. Output: The maximum value.

Example:

Input:  5
        3
        7
        1
        9
        4
Output: 9
Premium is coming soon. All grading features are currently unlocked.

Sample Test Cases

Test 1: Max in middle
Inputs: 5, 3, 7, 1, 9, 4
Expected: 9
Test 2: Max at start
Inputs: 3, 10, 5, 8
Expected: 10
Press Ctrl+Enter to run your code
or Ctrl+Shift+Enter to grade