Teaching myself C and finding that when I do an equation for a temp conversion it won\'t work unless I change the fraction to a decimal. ie,
tempC=(.555*(tempF
If you put 5/9 in parenthesis, this will be calculated first, and since those are two integers, it will be done by integer division and the result will be 0, before the rest of the expression is evaluated.
You can rearrange your expression so that the conversion to float occurs first:
tempC=((5/9)*(tempF-32));
→ tempC=(5*(tempF-32))/9;
or of course, as the others say, use floating point constants.