Hiw to find the biggest number and the smallest number of an array in Js
how to find the biggest and the smallest number of an array
Answers
Answered by
2
Answer:
Algorithm to find the smallest and largest numbers in an array
Input the array elements.
Initialize small = large = arr[0]
Repeat from i = 2 to n.
if(arr[i] > large)
large = arr[i]
if(arr[i] < small)
small = arr[i]
Print small and large
Answered by
1
Answer:
bigss bigsset nambar 109 smllest 73
Similar questions
English,
3 months ago
Science,
3 months ago
Computer Science,
7 months ago
History,
11 months ago
English,
11 months ago
Social Sciences,
11 months ago