K&R Exercises

Exercise 1-4: Celsius to Fahrenheit table

Write a program to print the corresponding Celsius to Fahrenheit table.

Print a row for each Celsius temperature from 0 to 300 in steps of 20, using printf("%3.0f %6.1f\n", celsius, fahr).

#include <stdio.h>

/* print Celsius-Fahrenheit table
   for celsius = 0, 20, ..., 300; floating-point version */
int main()
{
  /* your code goes here */

  return 0;
}

Test Cases

· space→ tab↵ newline

Submissions

No submissions yet