yaa357621 yaa357621
  • 19-05-2022
  • Computers and Technology
contestada

6. Write a C++ program to print the largest three elements in an array.
​

Respuesta :

basantisangma
basantisangma basantisangma
  • 19-05-2022

Answer:

if (arr[i] > max) -> max3 = max2, max2 = max , max = arr[i]. else if (arr[i] > max2) -> max3 = max2, max2 = arr[i]. else if (arr[i] > max3) -> max3 = arr[i]. At the end of the loop, we will print all three values.

Answer Link

Otras preguntas

Victorious set a goal for the number of boxes of Girl Scout cookies she wants to sell. So far, she has sold 33 boxes. If this is 9 more than 2/5 of her goal, wh
q=1/8ns how to solve for n
The entire United States and the rest of the world serve as the hinterland for all of the following cities except
Inciting a fight by using threats and profanity could be considered __________, which is not a protected type of speech.
The domestication of plants led to more stationary settlements during the First Agricultural Revolution. Please select the best answer from the choices provid
15 points...........
Which most accurately explains how the union of Austria and Hungary contributed to the outbreak of World War I? A.The Powerful Economy of Austria-Hungary Domina
In the least squares line ŷ = 5 − 2x, what is the value of the slope?
What is the total number of missions in colonial texas
help me solve this, ​please.