forssenkollie forssenkollie
  • 24-08-2021
  • Computers and Technology
contestada

find the maximum and minimum of an array of size ten​

Respuesta :

jaegucci
jaegucci jaegucci
  • 24-08-2021

Answer:

// Naive solution to find the minimum and maximum number in an array. public static void findMinAndMax(int[] A) ...

int max = A[0]; int min = A[0];

// do for each array element. for (int i = 1; i < A. ...

if (A[i] > max) { max = A[i]; ...

else if (A[i] < min) { ...

System. ...

{ ...

// find the minimum and maximum element, respectively.

Answer Link

Otras preguntas

What is the probability of spinning an even number? I really need help :(
Is there humanity in the world ​
Explain and evaluate how culture and civilization has made the ecology and object that the human subject can and has to tame and conquer and manipulate
Most of us are on here because were lazy and don't want to do school
Enumerate four demerits of an open plan office​
Classify the triangle by its sides and angles 5.5in 5.5in 1.5in
Rebecca ran a shorter distance than Stacy but a longer distance than Josie. Josie ran a longer distance than Finn. Who ran a shorter distance, Stacy or Finn?
An object with a mass of 2.0 kg accelerates 8.3 m/s? when an unknown force is applied to it. What is the amount of the force?
Helium is a colourless, odorless used in bolloons. Calculate . the pressure Cin atm) exerted by 1.82 mous of gas in a steel vessel of volume 5.43 L at L 69.58°C
Help for the brainiest answer quickly please