C Program to Convert Temperature from Celsius to Fahrenheit

C Program to Convert Temperature from Celsius to Fahrenheit:
If you are using any software then below program will not give an error, but if you are using TURBO C then you have to make some changes like: void main() and some function like clrscr() or getch().

#include<stdio.h>

main()
{
 float celsius,fahrenheit;

 printf("Enter temperature in Celsius : ");
 scanf("%f",&celsius);

 fahrenheit=(1.8*celsius)+32;
 printf("\nTemperature in Fahrenheit : %f ",fahrenheit);
}

OUTPUT:

Enter temperature in Celsius : 16

Temperature in Fahrenheit : 60.799999

You may also like...

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.