#include <stdio.h>
void main()
{
float c,f;
printf("\nEnter the temperature in Celsius: ");
scanf("%f",&c);
f = (1.8 * c) + 32;
printf("\nTemperature in Fahrenheit = %.2f\n",f);
printf("\nEnter the temperature in Fahrenheit: ");
scanf("%f",&f);
c = (f-32) * (5/9);
printf("\nTemperature in Celsius = %.2f\n",c);
}
Output:
Enter the temperature in Celsius: 0
Temperature in Fahrenheit = 32.00
Enter the temperature in Fahrenheit: 32
Temperature in Celsius = 0.00