C Program To Convert Temperature Celsius To Fahrenheit

C Program To Convert Celsius To Fahrenheit. If you are looking for a C program to convert temperature from degree celsius to fahrenheit example, this C programming tutorial will help you to learn how to write a program for celsius to fahrenheit in C. Just go through this C programming example to learn about decimal to binary conversion.

C Program To Convert Celsius To Fahrenheit

Learn how to write a c Program to convert Celsius To Fahrenheit. Writing celsius to fahrenheit conversion program in C can be done using various techniques but here in this program, we show how to write a c program for celsius to fahrenheit in a proper way. Happy coding.

Celsius To Fahrenheit Conversion Formula

For converting temperature from celsius to fahrenheit, there is a standard formula, that is :

fahrenheit = (celsius * 9 / 5) + 32  or fahrenheit = (celsius * 1.8) + 32

By using this formula, we can write C program to convert celsius to fahrenheit.

Related Program: C Program To Convert Decimal To Binary

C Program To Convert Temperature From Celsius To Fahrenheit

You can copy paste the below C Program For Celsius To Fahrenheit Conversion using temperature conversion formula, in c compiler to check how the source code work. Or write your own decimal to binary C Program with the help of this below c programming tutorial.

Source Code To Convert Celsius To Fahrenheit

/* C program to convert celsius to fahrenheit - CelsiusFahrenheit.C */

#include<stdio.h>

 int main() {

 float celsius, fahrenheit; //variable declaration
 
 //Asking your to enter temparature in celsius degree
 printf("\n Pleas Enter Temperature in Celsius : ");

 //Reading user entered celsius value
 scanf("%f", &celsius);

//Logic to convert Celsius to Fahrenheit  
fahrenheit = ((9/5) * celsius) + 32;
//fahrenheit = (1.8 * celsius) + 32;

//This statement prints converted temparature in fahrenheit degree 
printf("\n Converted Temperature in Fahrenheit : %f ", fahrenheit);

return (0);

}

C Program To Convert Degree Centigrade To Fahrenheit Output

After you compile and run the above c program to convert celsius to fahrenheit, your C compiler asks you to enter the celsius value to convert into fahrenheit. After you enter a value, the program will be executed and give output as a fahrenheit value.

Output:

Pleas Enter Temperature in Celsius : 25

Converted Temperature in Fahrenheit : 77

C PROGRAMMING EXAMPLES

Leave a Reply

Your email address will not be published. Required fields are marked *