Convert Celsius to Fahrenheit C Program

By | March 14, 2016

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

#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

#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

Convert Celsius To Fahrenheit in C Programming Language

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.

Let's Discuss