c - Expected expression error on a temperature conversion table -


getting "expected expression error" on line 17 when following c programming book. complete noob here , not sure i'm doing wrong.

int main() { float fahr, celsius; int lower, upper, step;  lower = 0; /* lower limit of temperature table */ upper = 300; /* upper limit */ step = 20; /*step size */  fahr = lower; while (fahr <= upper ) {     celsius = (5.0/9.0) * (fahr - 32.0);     printf(“%3.0f %6.1f\n”, fahr, celsius);     fahr = fahr + step;     }     return 0; } 

you need replace quotes “” in

printf(“%3.0f %6.1f\n”, fahr, celsius); 

with standard double quotes ""

printf("%3.0f %6.1f\n", fahr, celsius); 

as aside, should #include <stdio.h> @ top of file declaration of printf


Comments

Popular posts from this blog

java - JavaFX 2 slider labelFormatter not being used -

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -