rendered paste bodyCode:
#include <stdio.h>
/* print Fahrenheit-celsius tabel
voor fahr = 0, 20, ...., 300 */
main()
{
int fahr, celsius;
int lower, upper, step;
lower = 0; /* lower limit of temperature table */
upper = 300; /* upper || || || || */
step = 20; /* step size */
fahr = lower;
while (fahr <= upper) {
celsius = 5 * (fahr-32) / 9;
printf(%d\t%d\n", fahr, celsius);
fahr = fahr + step;
}
}
Error:
xitron@citix:~/C$ gcc -o fahr_cels fahr_cel.c
fahr_cel.c: In function main:
fahr_cel.c:17: error: expected expression before % token
fahr_cel.c:17: error: stray \ in program
fahr_cel.c:17: error: stray \ in program
fahr_cel.c:17: error: missing terminating " character
fahr_cel.c:19: error: expected ; before } token
whats wrong?