C Program To Convert Celsius To Fahrenheit
Learn How To Convert Celsius To Fahrenheit in C Programming Language. This C Program For Temperature Conversion from Celsius into Fahrenheit is developed using Simple Mathematical Operators in C Language.
Formula To Temperature Conversion From Celsius into Fahrenheit
Fahrenheit = (Celsius * (9/5)) + 32
This Formula can be modified as:
Fahrenheit = (Celsius * 1.8) + 32
C Program To Convert Celsius To Fahrenheit without Function
1 2 3 4 5 6 7 8 9 10 11 12 | #include<stdio.h> int main() { double celsius, fahrenheit; printf("\nEnter The Temperature in Celsius: \t "); scanf("%lf", &celsius); fahrenheit = (celsius * 1.8) + 32; printf("\nTemperature in Fahrenheit: \t %lf", fahrenheit); printf("\n"); return 0; } |
Convert Celsius into Fahrenheit in C Programming using Function
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | #include<stdio.h> double temperature_conversion(double c) { double fahrenheit; fahrenheit = (c * 1.8) + 32; return fahrenheit; } int main() { double celsius; printf("\nEnter The Temperature in Celsius: \t "); scanf("%lf", &celsius); printf("\nTemperature in Fahrenheit: \t %lf", temperature_conversion(celsius)); printf("\n"); return 0; } |
Also Read: Temperature Conversion From Fahrenheit To Celsius in C Programming
Output

If you have any Compilation Errors with this C Program To Convert Celsius to Fahrenheit Temperature or if you have any doubts about this Program, mention about it in the Comment Section.