This is the exercise:
1.12.3. The conversion from Farenheit to Celsius degrees is 5 C = 9 (F - 32)
Make an algorithm that computes and writes a centigrade table based on Farenheit degrees, ranging from 50 to 150 from 1 in 1.
I made my code like this:
#include <stdio.h>
int main () {
float F, C;
for (F=50; F<=150; F++) {
printf("--------------------------------\n");
printf("Farenheit = %.0f",F);
C = (5 / 9) * (F - 32);
printf("\nConvertido para centígrados = %.2f\n",C);
}
printf("\n");
return 0;
}
I've done something wrong in the code or is it compiler error?