PRF03ARRAY0104 - ARRAY (MIN)
Write a program that allows users to enter a numeric array with N elements. The program will display minimum of the entered array values.
Example 1
How many element of numeric array:5
The value of a[1] is:2
The value of a[2] is:-1
The value of a[3] is:8
The value of a[4] is:3
The value of a[5] is:0
Min:-1
Example 2
How many element of numeric array:3
The value of a[1] is:2
The value of a[2] is:1
The value of a[3] is:3
Min:1
Note by Editorial Board
This program outputs prompts as though it is running in an interactive environment. SPOJ isn't interactive, and you'll get a better idea of what the real output should look like if you run your program in a similar non-interactive environment, such as ideone. I've done this and added the output below to give an alternative view of how the output should be formatted. Note the lack of newlines after the prompts. It looks like the problem setter has chosen the exact judge, so your output must match exactly.
Example
Input: 5 2 -1 8 3 0 Output: How many element of numeric array:The value of a[1] is:The value of a[2] is:The value of a[3] is:The value of a[4] is:The value of a[5] is: Min:-1
Input: 3 2 1 3 Output: How many element of numeric array:The value of a[1] is:The value of a[2] is:The value of a[3] is: Min:1
hide comments
Simes:
2023-02-15 16:34:06
@Mostafa 36a2: I've added an explanation along with the more traditional format input and output sections, does it help? |
|
Mostafa 36a2:
2022-09-11 13:00:52
The input/output is not defined well, please check the input/output files |
Added by: | khanhvh |
Date: | 2020-11-02 |
Time limit: | 1s-10s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |