Thursday, March 3, 2016

Farenhit to Celcius conversion in C

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
#include<stdio.h>
#include<math.h>

main()
{
    float far, cel , kelvin;
    while(printf("Enter your temp in farenheit: ")!=EOF){
    scanf("%f",&far);
    cel=(far-32)/1.8;
    kelvin=cel+273;
    printf("Your Kelvin temp is %.2fK\n",kelvin);
    }
}

No comments:

Post a Comment

Thank you for commenting. Please wait for response :)