Alisam5071 Alisam5071
  • 15-11-2021
  • Computers and Technology
contestada

the numNegative variable counts the number of negative value in the array userVals. What should numNehative be initialized to

Respuesta :

emmaginative
emmaginative emmaginative
  • 15-11-2021

Answer:

numNegative should be initialized to 0 and should subsequently increase by 1 every time a negative value is encountered when going through userVals.

Explanation:

The variable needs to start at 0 so it has an accurate count of the negative values when it has gone through the entireity of the array.

Answer Link

Otras preguntas

Germanic law at the time of the great migrations was often designed to limit the exercise of vengeance. True False
what does the idea of "natural rights" mean?
how is human development comtributory to human resources?​
how can we calculate the e.m.f of the battery?.
Explain and Prove that the sides of the triangles below are a right triangle. 1.) 5, 10,12 2.) 6,5,3 3.) 3, 4, 5 4.) 6, 8,10 *Pls explain all ill give you brain
Technetium-104 has a half-life of 18.0 minutes. How much of a 165 g sample is left after 90.0 minutes?
Select the equivalent expression for the following: 12^3 * 12^9 * 12^4 * 12^2 a: 12^18 b: 12^216 c: 20,736^18 d: 2.66 *10^19
Read the following sentences from "Marriage is a Private Affair." "I owe it to you, my son, as a duty to show you what is right and what is wrong. Whoever put t
How did the spanish help the american cause for independence?
Ahab has been sent to the shops by his mother. The shops are 1200 m from his home. If Ahab can run at an average speed of 6 m/s, how long will it take him 5 to