Friday, 5 January 2018

Centigrade to Fahrenheit and vice-versa

C Program to convert Centigrade to Fahrenheit and vice-versa

void main()
    float cent,fahr;
    printf("Enter temperature in centigrade: ");
    fahr = 9.0/5.0 * cent + 32.0;
    printf("Fahrenheit equivalent is %.1f\n",fahr);
    printf("\nEnter temperature in fahrenheit: ");
    cent = 5.0/9.0 * (fahr-32.0);
    printf("Centigrade equivalent is %.1f\n",cent);
    return 0;


No comments:

Post a Comment

Featured Post

TCS Latest Test Patern ( For On-Campus Drives )

Tata Consultancy Services is software services consulting company whose  headquarter is situated in Mumbai, India. It is the Asia’s larges...