Tuesday 22 January 2013

Centigrate to Fahrenheit

//Program to convert temperature from degree centigrade to Fahrenheit:
// (f-32)/180 = c/100

#include<stdio.h>

int main()
{
    float c,f;

    printf("enter temp in centigrade:\n ");
    scanf("%f",&c);
   
    f=(1.8*c)+32;
    printf("temp in Fahrenheit=\n%f",f);
    return 0;
}

No comments:

Post a Comment