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

PROGRAMMING:Maximum and minimum

Luz5年前 (2021-05-10)题库414
Given a positive integer n, then enter n positive integers (the input number is greater than or equal to 0, less than 1000).
Find out the maximum and minimum of them, output the maximum minus the minimum.
###Input format:
A positive integer n
Next, enter n consecutive positive integers
###Output format:
Enter the result of * * maximum minus * * minimum in the integer
###Input example:
```in
five
4 8 10 1 2
```
###Output example:
```out
nine
```







answer:If there is no answer, please comment