Learn about Celsius to Fahrenheit C program using For loop in the below code example. Also refer the comments in the code snippet to get a detailed view about what’s actually happening.
Contents
Celsius to Fahrenheit C program using For loop
Source code:
#include<stdio.h>
int main()
{
int cel;
for(cel=0 ; cel <= 200 ; cel = cel + 20)
{
printf("%d \t %4.2f \n", cel, ( cel * (9.0/5.0) ) + 32);
}
return 0;
}
Output:
100 212.00 150 302.00 200 392.00 250 482.00 300 572.00
Hope above code works for you and Refer the below Related Codes to gain more insights. Happy coding and come back again.
Similar Codes :
C Program to Convert Celsius to Fahrenheit In a Range
Convert Celsius to Fahrenheit using the C Program