Exercise 1-4
🎗ī¸

Exercise 1-4

❓
Write a program to print the corresponding Celsius to Fahrenheit table
#include <stdio.h> /* print Celsius-Ferenheit table for celcius = 0, 20, .... 300; floating point version */ int main() { float fahr, celcius; int lower, upper, step; lower = 0; upper = 300; step = 20; celcius = lower; printf("Celcius \tFerenheit\t \n"); while (celcius <= upper) { fahr = (9.0 / 5.0) * celcius + 32.0; printf("%7.0f %13.1f\n", celcius, fahr); celcius = celcius + step; } return 0; }