/*Newly added tags for bing*/ Unipune Codes: Temperature Conversion using C

Pages

Monday, 12 February 2018

Temperature Conversion using C

 
       
/*
Accept the temperature in Fahrenheit and print it in Celsius and kelvin using C.
*/
#include<stdio.h>
main()
{
    int f;
    float c,k;
    printf("Enter f - ");
    scanf("%d",&f);
    c=(f-32)*(0.55555555555);
    printf("Temperature in Celsius = %f\n",c);
    k=c+273;
    printf("Temperature in kelvin = %f\n",k);
}

No comments:

Post a Comment