Just a small question:
I have just began learning the C language and have come upon a question:
In a program I have written to convert the temperature from Faranheite to Centigrade something curious has come up, when I set the equation of my conversion to look like this:
celcius = (5/9) * (frnht - 32)
my results are always zero. However, when I re-arrange it to look like this:
celcius = 5 * (frngt - 32)/9
my results are accurate. Both statements are mathamatically correct but only one works. The question I have is are mathmatic equations in the C language dependant on the variable being directly involved in the actions of the numbers?