temp_table - #define DT 10.0 step in F values int main...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
/* temp_table.c * Program to produce a table of Fahrenheit versus Celsius * temperatures, using a for loop. */ #include <stdio.h> #define T1 0.0 /* lower limit of F values */ #define T2 200.0 /* upper limit of F values */
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: #define DT 10.0 /* step in F values */ int main() { float tempc, tempf; for (tempf = T1; tempf <= T2; tempf = tempf + DT) { tempc = (5.0/9.0)*(tempf - 32.0); printf("%3.0f %.2f\n", tempf, tempc); } return 0; }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online