Fahrenheit
to Centigrade conversion.
#include <stdio.h>
#include <conio.h>
void main ( )
{
float c, f ;
clrscr ( );
printf ("\n Enter the temperature in Fahrenheit : -"); scanf ("%f",&f);
c = ( ( f - 32 ) * 5 ) / 9;
printf ("\n Temperature in Centigrade is : - %f", c);
getch ( );
}
#include <conio.h>
void main ( )
{
float c, f ;
clrscr ( );
printf ("\n Enter the temperature in Fahrenheit : -"); scanf ("%f",&f);
c = ( ( f - 32 ) * 5 ) / 9;
printf ("\n Temperature in Centigrade is : - %f", c);
getch ( );
}
Centigrade to Fahrenheit conversion.
#include <stdio.h>
#include <conio.h>
void main ( )
{
float c, f ;
clrscr ( );
printf ("\n Enter the temperature in Centigrade : -"); scanf ("%f",&c);
f = ( c * 9 + 160 ) / 5;
printf ("\n Temperature in Fahrenheit is : - %f", f);
getch ( );
}
#include <conio.h>
void main ( )
{
float c, f ;
clrscr ( );
printf ("\n Enter the temperature in Centigrade : -"); scanf ("%f",&c);
f = ( c * 9 + 160 ) / 5;
printf ("\n Temperature in Fahrenheit is : - %f", f);
getch ( );
}
No comments:
Post a Comment