I have to write a program that converts Fahrenheit from 0 to 212 to floating-point Celsius with 3 digit of precision. The output should be printed in two right-justified columns of 10 characters each and the Celsius should be preceded by sign for both positive and negative values. please help me thanks. this is what i have:
#include <stdio.h>
int main(void)
{
int fahrenheit;
double celsius;
for (fahrenheit = 0; fahrenheit <= 212; fahrenheit++)
{
celsius = 5.0 / 9.0 * ( fahrenheit - 32 );
printf("\t%+.3f\n", celsius);
}
return 0;
}