Converting Celcius to Fahrenheit and vise versa

How do I use functions to write a program that prints charts showing the Fahrenheit equivalent of all celcius temperatures from 0 to 100 degrees and the celcius equivalent of all fahrenheit temperatures from 32 to 212 degrees?
Don't do these kind of post again please.

1
2
3
4
5
6
7
8
9
10
11
12

float c = 0.0 ,f = 0.0;
for (f = 32.0; f <=212.0; f++ ) {
    c = (5/9)*(f-32); 
   printf ("%g\t", c);
}

for (c = 0.0; c <= 100; c++) {
  f = (9/5)*c+32;
  printf ("%g\t", f);
}
Don't post full solutions to homework problems, please. Especially if you don't even bother to explain it.

EDIT: And especially if it doesn't work. /EDIT

People aren't going to learn if you give handouts.
Last edited on
closed account (z05DSL3A)
Dixiie,

What specifically are you having a problem with?
Topic archived. No new replies allowed.