/* Temperature of a city in fahrenheit degrees in input through the keyboard. Write a program to convert this temperature into centigrade degrees. */
#include<stdio.h>
#include<conio.h>
main()
{
float fr,cent;
printf("Enter the temperature(F):");
scanf("%f",&fr);
cent=5.0/9.0*(fr-32);
printf("\nTemperature in centigrade=%f",cent);
printf("\n\n\n\n\n\nEnter any key for exit....");
getch();
}
Output :
#include<stdio.h>
#include<conio.h>
main()
{
float fr,cent;
printf("Enter the temperature(F):");
scanf("%f",&fr);
cent=5.0/9.0*(fr-32);
printf("\nTemperature in centigrade=%f",cent);
printf("\n\n\n\n\n\nEnter any key for exit....");
getch();
}
Output :
No comments:
Post a Comment