1.
What should be the return type of the function
convertToCelsius
?
______ convertToCelsius(double fahrenheit) {
double celsius;
celsius = (fahrenheit - 32) * 5 / 9;
return celsius;
}
int
- What variable are we returning in the function, and what is the variable’s type?
double
- The function returns
celsius
, which is adouble
. string
- What variable are we returning in the function, and what is the variable’s type?
void
- Since we are returning something in the function, the function is not
void
.