Degree Celsius to f conversion program

By | June 17, 2019

“Degree Celsius to f conversion” program will compute Fahrenheit temperature. This program takes temperature in Celsius degrees.

The popular formula for Degree Celsius to f conversion is:

f = 9/5 x c + 32

 

/*
Write a C Program 
to input temperature in Celcius 
and converts it into Fahrenheit
formula is  f = 9/5 * C + 32
*/
#include<stdio.h>

int main()
{
   float f, c;
   printf("Enter temperature in Celcius =");
   scanf("%f", &c);
   f = 9.0 / 5.0 * c + 32;
   printf("The temperature in Fahrenheit is = %.1f f", f);
   return 0;
}

While discussing the general execution of this C program, first of all user will see a prompt ” Enter temperature in Celsius=”. The user will input required temperature in c degree. Then program will compute Fahrenheit and show the result on screen.

A sample run of this Degree Celsius to f program is shown in the following figure:

Degree Celsius to f program in C

Degree Celsius to f program in C

Degree Celsius to f calculator program in C

Loading

One thought on “Degree Celsius to f conversion program

  1. Pingback: Fahrenheit to Celsius Conversion C Program - EasyCodeBook.com

Leave a Reply

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