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

Search results for "A shipment of 18 cars, some weighing 3,000 pounds, and the others weighing 5,000 pounds each. Together the shipment has a total weight of 30
What kind of particles make up compound
List 3 commercial uses of sponges.
What is the quotient of -1 4/5 and 2 1/4?
How does 4/15=14/n? What does n equal?
What is the quotient of -1 4/5 and 2 1/4?
C(squared)L(squared) + 100v(squared) = 100c(squared)I have to solve for L
What kind of particles make up compound
What is the quotient of -1 4/5 and 2 1/4?
Search results for "A shipment of 18 cars, some weighing 3,000 pounds, and the others weighing 5,000 pounds each. Together the shipment has a total weight of 30