Subscribe

RSS Feed (xml)

Monday, July 20, 2009

Write a C program to convert Fahrenheit degrees into Centigrade and Vice-Versa

#include(stdio.h)
#include(conio.h)
int main( )
{
float f, c;
clrscr( );
printf("Enter the fahrenheit degrees:");
scanf("%f", &f);
c= (f-32)/1.8 ;
printf("\nAfter Fahrenheit degrees, Centigrade Degrees = %f", c);
f= 1.8*c + 32.0;
printf("\nAfter Centigrade degrees, Fahrenheit degrees = %f", f);
getch( );
return 0;
}

No comments:

Post a Comment