PRF03ARRAY0101 - ARRAY (INPUT,OUTPUT)

Write a program that allows users to enter a numeric array with N elements. The program will display them.

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

 

5 element of numeric array:

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

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

 

3 element of numeric array:

The value of a[1] is:2

The value of a[2] is:1

The value of a[3] is:3


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:

5 element of numeric array:
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
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:

3 element of numeric array:
The value of a[1] is:2
The value of a[2] is:1
The value of a[3] is:3

Added by:khanhvh
Date:2020-11-02
Time limit:1s-10s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All

hide comments
2023-02-15 13:53:44 Simes
Don't write the lines
Process returned 0 (0x0) execution time : 4.864 s
Press any key to continue.
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.