Centigrade to Fahrenheit

Write a program that accepts the temperature in Centigrade and convert it to Fahrenheit.  

#include<stdio.h>
#include<conio.h>

void main()
{
    float F,C;
    clrscr();

    printf("Enter the value of temperature in Centigrade C = ");
    scanf("%f",&C);

    F = 32+ 1.8 * C;

    printf("The value of
Centigrade to Fahrenheit is %f ",F);

    getch();

}


Output:
Enter the value of temperature in Centigrade C =  5
The value of Centigrade to Fahrenheit is 41.000000

Post a Comment

0 Comments