The numNegatives variable counts the number of negative valu…
The numNegatives variable counts the number of negative values in the array userVals. What should numNegatives be initialized to, to make sure it has the correct value after the for loop? int userVals[20];int i;int numNegatives = /* What should this be? */ ; for (i = 0; i < 20; ++i) { if (userValues[i] < 0) { numNegatives = numNegatives + 1; }}
Read DetailsHow many parameters does FahrenheitToCelsius have? double Fa…
How many parameters does FahrenheitToCelsius have? double FahrenheitToCelsius(double fahrenheit) { return (fahrenheit – 32.0) * 5.0 / 9.0;} int main() { double fahrenheit; cin >> fahrenheit; int c1; int c2; int c3; int c4; c1 = FahrenheitToCelsius(fahrenheit); c2 = FahrenheitToCelsius(32); c3 = FahrenheitToCelsius(78); c4 = FahrenheitToCelsius(100);}
Read Details