1
0
mirror of https://github.com/krislamo/knrc.git synced 2024-11-10 00:30:35 +00:00
knrc/03-celsius-to-fahrenheit.c

12 lines
249 B
C
Raw Normal View History

#include <stdio.h>
/* print Celsius-Fahrenheit table */
int main()
{
int cels;
printf("Celsius\t\tFahrenheit\n==========================\n");
for (cels = 0; cels <= 300; cels = cels + 20)
printf("%3d\t\t%10.0f\n", cels, (9.0/5.0)*cels+32);
}