-->
当前位置:首页 > 题库

PROGRAMMING:Find the maximum number and its subscript, and exchange position with a [0]

Luz5年前 (2021-05-10)题库331
There is an array of memory to put 10 integers. It is required to find out the maximum number and its subscript, and then exchange it with the 0 th element in the array.
###Input format:
Enter 10 integers in a row, and only one space can be used between the data.
###Output format:
Output the changed array directly in one row, each number takes up 4 column width. In the next line, output the maximum number and its subscript in the order of "max = maximum, position = maximum subscript".
###Input example:
```in
1 2 3 4 5 6 7 8 9 10
```
###Output example:
```out
10 2 3 4 5 6 7 8 9 1
max=10,weizhi=9
```






answer:If there is no answer, please comment