I'm trying to make a temperature conversion function for a class assignment, and my function receives all of the arguments correctly but for some reason after it hits the equation to convert the number it just makes the number 0.
Here is the code so you know what I'm talking about:
void convertToCelsius(int farenheitTemperature, int temperatureType){
if (temperatureType == 1)
{
farenheitTemperature = ((5/9) * (farenheitTemperature - 32));
printf("Your temperature in Celsius is %i\n", farenheitTemperature);
}
else
{
printf("Your temperature is already in celsius!\n");
}
}
the main function puts the arguments in correctly, so I don't think that's the problem.
Thank you very much for any help you can give!