Convert temperature from centigrade to Fahrenheit in C language

WAP in C language that accepts the temperature in Centigrade and converts into Fahrenheit.

In this program we will take Temperature from user in Celsius as an input and convert it into Fahrenheit 

  • Fahrenheit = (1.8 * Celsius )+32



#include<stdio.h>

#include<conio.h>

 void main() 

{

  float celsius, fahrenheit;

  clrscr();

  printf("\nEnter temp in Celsius : ");

  scanf("%f", &celsius);

  fahrenheit = (1.8 * celsius) + 32;

  printf("\nTemperature in Fahrenheit : %f ", fahrenheit);

  getch();

}


Output

Enter temp in Celsius : 35

Temperature in Fahrenheit :98.000000


Post a Comment

0 Comments