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

PROGRAMMING:Exchange minimum and maximum

Luz5年前 (2021-05-10)题库394
This problem requires the preparation of procedures, first input a series of integers in the minimum value and the first number exchange, and then the maximum value and the last number exchange, and finally output after the exchange sequence.
Note: the maximum and minimum values of the title are unique.
###Input format:
Enter a positive integer n ($$$Le $$10) in the first line, and N integers in the second line, separated by spaces.
###Output format:
Output the exchanged sequence in a row, each integer followed by a space.
###Input example:
```in
five
8 2 5 1 4
```
###Output example:
```out
1 2 5 4 8
```






answer:If there is no answer, please comment