Program
Write a temperature conversion program that gives the user the option to converting the Fahrenheit to Celsius to Fahrenheit. Then carry out the conversion. Interaction of the program might look like thisEnter 1 for convert Fahrenheit to Celsius.
Enter 2 for convert Celsius to Fahrenheit.
Program Solution....
#include<stdio.h>#include<conio.h>
void main()
{
clrscr();
int op;
float f,c;
printf("Enter the choice\n Enter 1 for convert Fahrenheit to Celsius.\nEnter 2 for convert Celsius to Fahrenheit.");
scanf("%d",&op);
if(op==1)
printf("Enter the Celsius..");
scanf("%f",&c);
f=9/5*c+32;
printf(Fahrenheit =======>>>%f",f);
else if(op==2)
printf("Enter the Fahrenheit ");
scanf("%f",&f);
f=5/9*f-32;
printf("Celsius =======>>>%f",f);
else
printf("Invalid Choice ");
getch();
}