The more serious problem is that because we have used integer arithmetic, the Celsius
temperatures are not very accurate; for instance, 0oF is actually about -17.8oC, not -17. To get
more accurate answers, we should use floating-point arithmetic instead of integer. This
requires some changes in the program. Here is the second version:
#include
/* print Fahrenheit-Celsius table
for fahr = 0, 20, ..., 300; floating-point version */
main()
{
float fahr, celsius;
float lower, upper, step;
lower = 0; /* lower limit of temperatuire scale */
upper = 300; /* upper limit */
step = 20; /* step size */
fahr = lower;
while (fahr