Programming

C – Convert Temperature in Fahrenheit (F) into Centigrade (C)

Write a program to convert temperature in Fahrenheit into Centigrade.

C Code

#include<stdio.h>
#include<conio.h>

void main()
{
int f;
float c;

printf("n enter temperature in fahrenheit :");
scanf("%d",&f);

c = (f-32)/1.8;

printf("Output : %.2f",c);

getch();

}

Output

Tuts

About Author

Tutsmaster.org provides tutorials related to tech and programmings. We are also setting up a community for the users and students.