Pseudocode Compiler
Practice

Array Sum

MEDIUMArrays

Read an integer N (1 ≤ N ≤ 10), then read N integers. Output their sum.

Input: N on the first line, then N integers one per line. Output: The sum of all N integers.

Example:

Input:  3
        10
        20
        30
Output: 60
Premium is coming soon. All grading features are currently unlocked.

Sample Test Cases

Test 1: 5 numbers
Inputs: 5, 10, 20, 30, 40, 50
Expected: 150
Test 2: 3 numbers
Inputs: 3, 1, 2, 3
Expected: 6
Press Ctrl+Enter to run your code
or Ctrl+Shift+Enter to grade