In this task, you need to:
1. Read integers from the keyboard until something else is entered, such as a string or a character.
At least two numbers must be entered. If less than two integers are entered, then terminate the program with an error. You don't need to handle this situation.
2. Display
Second smallest number entered
- 4
Locked
Comments (5)
- Popular
- New
- Old
You must be signed in to leave a comment
Henk Developer at Inovo
22 March, 06:50
once again, vague requirements. What does "If several second smallest numbers are entered, then you need to display any one of them" mean ?
0
Alex Tor
14 July 2022, 06:13
I almost give up on this task, why you guys don't post more examples of what is expected from the solution?
0
Alex Tor
14 July 2022, 07:27
from the current test:
Be sure that the second smallest is displayed when you enter the numbers 2 2 1.
how am I supposed to know which output would be correct in this case?
Apparently, the JUDGE expects 2 as an output, but 2 is not a second less number, it's just a second number in a row, the second less number would be 1, but it seems JUDGE has its own logic.
0
Roman
18 July 2022, 05:43
This task has an input-output example with explanations in the comments:
+1
Anonymous #10989168
4 May 2022, 16:11
The task does not specify what to display if all the entered numbers are equal
+1