Write a program to convert a given temperature value from Fahrenheit scale to Centigrade scale and vice versa.


Input


#include<stdio.h>
int main()
{
    float Farenheit,Centigrade;
   

    printf("Enter a temperature in Farenheit:");
    scanf("%f",&Farenheit);
   

    Centigrade=(5.0/9)*(Farenheit-32);
    printf("Temperature in Centigrade: %.2f\n",Centigrade);

    return 0;
}




Output


Enter a temperature in Farenheit:6
Temperature in Centigrade: -14.44

No comments:

Post a Comment