PRF03ARRAY0102 - ARRAY (SORT)

no tags 

Write a program that allows users to enter a numeric array with N elements. The program will sort and 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

 

ASC:

5 element of numeric array:

The value of a[1] is:-1

The value of a[2] is:0

The value of a[3] is:2

The value of a[4] is:3

The value of a[5] is:8

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

 

ASC:

3 element of numeric array:

The value of a[1] is:1

The value of a[2] is:2

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:

ASC:
5 element of numeric array:
The value of a[1] is:-1
The value of a[2] is:0
The value of a[3] is:2
The value of a[4] is:3
The value of a[5] is:8
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:

ASC:
3 element of numeric array:
The value of a[1] is:1
The value of a[2] is:2
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