C Programs to practice -Fahrenheit to Celsius and Celsius to Fahrenheit conversions
Fahrenheit to Celsius conversion: This is a simple temperature conversion program. In this program ,the given temperature is in Fahrenheit. This program converts it to Celsius by using a simple formula. Program: “Fahrentocelsius.c” #include<stdio.h> #include<conio.h> void main() { /* variable declaration statement. Fa- Fahrenheit, ce- Celsius */ float fa, ce; printf(“ Enter the temperature value in Fahrenheit”); /* read the Fahrenheit value */ scanf(“%f”,&fa); / * formula for converting Fahrenheit to Celsius value */ ce=(fa-32)*5/9; /* The converted celsius value*/ printf(“The temperature value in celsius is: %f”,ce); getch(); } Try it : In the same way, you can try the Celsius to Fahrenheit conversion in your own. Steps for converting Celsius to Fahrenheit...