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

are red tail hawks sexual or asexual
1.Find the constant of variation for the relationship f(x)= 30x.  A.10  B.30  C.x  D.f(x)2.Find the constant of variation for the relationship shown in the foll
Which is the ocean is the largest
Please Help What is the domain of the function: {(1, 2); (2, 4); (3, 6); (4, 8)}?  A.{1, 2, 3, 4, 6, 8}  B.{1, 2, 3, 4}  C.{6, 8}  D.{2, 4, 6, 8}Which of the fo
particles of minerals and other rocks that make up a rock are called______
what is the shape of miranda's orbit path?
how many hours does venus stay after the sun sets
When a bicycle rider puts on the brakes of a bicycle, friction cause some of the mechanical energy to change into what type of energy?
A club with 31 members is to select five officers (president, vice president, secretary, treasurer, and historian). In how many ways can this be done?
please help me i dont get it