Monday, June 24, 2013

Write a program to convert Fahrenheit to degree?

Problem: 
convert the value in Fahrenheit into degree  , and relationship between degree and Fahrenheit is D=(F-32)*1.8

solution:

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

void main()
{
float deg,frn;
clrscr();
printf("enter the Fahrenheit");
scanf("%f",&frn);
deg=(frn-32)/1.8;
printf("the %.2fF---> %.2f deg",frn,deg);
getch();
}


Output


Like the Post? Do share with your Friends.

No comments:

Post a Comment