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

Mark recorded the temperature each day for a week. He calculated the mean temperature and found it was 21.6°C Mark’s thermometer was not working properly. Al
help please i really need the question will give brainily
30 points please help which kind of energy is stored in the bonds between molecules that make up food? kinetic energy potential energy thermal energy chemical
2a + 3b = 5 b= a - 5
which one is correct
some one please help me i need help really bad
Calculate the heat in kJ required to convert 2.1 g of water at 52.1°C to steam at 100°C. The specific heat of water is 4.184 J/g°C and the heat of vaporization
Why did the US government create the Warren Commission? because they wanted to prevent future presidential assassinations because Jack Ruby refused to explain w
Which of the following statements is correctly punctuated? A. Frank was very hungry: he went looking for food. B. Since it was New Year’s Day: the bank, superma
Simplify the expression 2(6x +7) + 10x