/* 4.write a program to enter the temprature in fahrenheit and
convert it to celsius. [c = (f-32)*5)/9] */
#include<stdio.h>
#include<conio.h>
void main()
{
float f,c;
clrscr();
printf("enter the temprature in fahrenheit: ");
scanf("%f",&f);
c =( (f-32)*5)/9;
printf("\nconvert it to celsius is: %0.2f%cC",c,248);
getch();
}
/* output:
enter the temprature in fahrenheit: 100
convert it to celsius is: 37.78°C
*/
No comments:
Post a Comment