Practice
Accept a Mark from 0 to 100
EASYLoops4 marks
Keep reading an integer until it is between 0 and 100 inclusive. Output that accepted mark and nothing else.
Input: One or more integers. The last one is in range. Output: The accepted mark.
Example:
Input: -1
101
40
Output: 40
Sample Test Cases
Test 1: Already valid
Inputs: 40
Expected: 40
Test 2: Two rejects then a mark
Inputs: -1, 101, 40
Expected: 40