Learn about Convert Celsius to Fahrenheit using the C Program in the below code example. Also refer the comments in the code snippet to get a detailed view about what’s actually happening.
Contents
Convert Celsius to Fahrenheit using the C Program
Source code:
#include<stdio.h>
int main()
{
float cel, fahr;
printf("Enter Celsius value: ");
scanf("%f",&cel);
fahr = (cel * (9.0/5.0)) + 32;
printf("Fahrenheit value = %.2f", fahr);
return 0;
}
Output:
Enter Celsius value: 100
Fahrenheit value = 212.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 :
Pattern Program 22 in C
Pattern Program 21 in C