GTU PPS Program - 6

6. Write a program to compute Fahrenheit from centigrade (f=1.8*c +32).

#include<stdio.h>
#include<conio.h>
int main()
{
    float cel,fet;
    printf("\nenter temperature in centigrades\b : ");
    scanf("%f",&cel);
    fet = 1.8*cel + 32;
    printf("\ntemperature in Fahrenheit : %7.2f",fet);
    getch();
    return 0;
}

Sample output

Comments

YouTube

Popular posts from this blog

GTU PPS Program - 15

Vim Text Editor

GTU PPS Program - 11