Thursday, 27 October 2011

C program to convert temperature from fahrenheit to celsius

WRITE A C PROGRAM TO CONVERT THE TEMPERATURE IN FAHRENHEIT TO CELSIUS, INPUT BY USER:
#include<stdio.h>
#include<conio.h>
void main()
{
  float f,c;
  printf("Enter the temperature in Fahrenheit:");
  scanf("%f",&f);
  c=(f-32)/9*5;
  printf("The temperature in Celsius is %f:",c);
  getch();
}

No comments:

Post a Comment