Pseudocode Compiler
Practice

Count Numbers in Range

MEDIUMLoops

Read an integer N (1 ≤ N ≤ 10), then read N integers. Count how many of the integers are in the range 10 to 20 inclusive. Output the count.

Input: N on the first line, then N integers one per line. Output: The count of numbers in the range 10–20.

Example:

Input:  5
        5
        15
        20
        25
        10
Output: 3
Premium is coming soon. All grading features are currently unlocked.

Sample Test Cases

Test 1: Three in range
Inputs: 5, 5, 15, 20, 25, 10
Expected: 3
Test 2: None in range
Inputs: 3, 1, 2, 3
Expected: 0
Test 3: Three in range
Inputs: 4, 10, 20, 15, 5
Expected: 3
Press Ctrl+Enter to run your code
or Ctrl+Shift+Enter to grade