Computer Science, asked by koshiyautsav0011, 1 month ago

Write a program that reads in 7 numbers and prints out both the smallest and the greatest value of the 7 given values. All the numbers should be input by the user only once, of course. If you need a hint, see the footnote.​

Answers

Answered by sanjoykumarsah
0

let nums = [6,3,7,5,1,4,2];

function ut1(arr){

let arr2 = arr.sort()

return([arr2[0], arr2[arr2.length - 1]])

}

ut1(nums)

Answered by sheikhhamzasubhani20
0

Answer:

1

2

3

4

5

6

9

6

7

9

4

5

8

3

1

3

4

6

7

7

8

0

6

Similar questions