Second smallest number entered

  • 4
  • Locked
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
You can't complete this task, because you're not signed in.
Comments (4)
  • Popular
  • New
  • Old
You must be signed in to leave a comment
Alex Tor
Level 16 , Bulgaria
14 July, 06:13
I almost give up on this task, why you guys don't post more examples of what is expected from the solution?
Alex Tor
Level 16 , Bulgaria
14 July, 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.
Level 41
18 July, 05:43
This task has an input-output example with explanations in the comments:
There may also be several minimum numbers.
Example input:
4 // Minimum number
4 // Minimum number
5 // Second smallest number
5 // Second smallest number
Example output:
Anonymous #10989168
Level 25 , Russia, Russian Federation
4 May, 16:11
The task does not specify what to display if all the entered numbers are equal