❔ Smaller number in a Loop
Write a console application that determines the smallest element in a given string of integers.
The numbers are entered one by one, and the application will read them one by one until the user enters the number 0. When the number 0 is entered, the application knows that all the numbers in the string have been entered and displays the smallest one.
The number 0 is also part of the string and if it is the smallest number entered by the user then the application will return 0.
Example:
For input data:
24
1
-3
3
-1
0
The console will display:
-3
I find out i have to use for but i don't know how to apply
The numbers are entered one by one, and the application will read them one by one until the user enters the number 0. When the number 0 is entered, the application knows that all the numbers in the string have been entered and displays the smallest one.
The number 0 is also part of the string and if it is the smallest number entered by the user then the application will return 0.
Example:
For input data:
24
1
-3
3
-1
0
The console will display:
-3
I find out i have to use for but i don't know how to apply

