Example with printf
#include <stdio.h>
/* Print a table of Fahenehit-Celsius values from 0 to 300 in increments of 20 */
void main (void) {
int d;
printf(�Fahrenheit Celsius\n�);
for (d= 0; d <= 300; d= d+20)
printf(�%3d %6.1f\n�, d, (5.0/9.0) * (d-32) );
}
Previous slide
Next slide
Back to first slide
View graphic version