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

Describe several communication issues which can occur when communications in the workplace do not take account of diversity​
3n - 10 = 5, Please answer and show your work please!
고, (e) A shop sells bags of compost in three different sizes. Small Medium Large 30 litres $5.82 50 litres $9.45 75 litres $14.50 Work out which size of bag giv
Letter writingWrite a letter to your mother informing you of your test results.​
If more talking about the person we love and describe him or her as everything I ever wanted and the most wonderful person ever, we're using which propaganda te
The straight line L has equation 3x – 2y = 15 Find an equation of the line that is parallel to L and crosses the x–axis at (–2, 0)
I need help on the question What percentage of the earth is covered by water?
Pleaaaaase hellllp asaaaap
7. You decide to invest $5000 in stock. Luckily, your stock is on the rise because each year your investment grows by 10%. Fill in the table of values showing h
I need help plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz