#include <stdio.h>
#include <conio.h>
main()
{
char scale;
int temp=0;
float ans;
printf("Enter F to convert Farnhieght to CELSIES.\nEnter C to convert Celcies to farnhiegh.");
scale=getche();
printf("\n");
if(scale=='F' || scale=='f')
{
printf("Enter temperature in farnhieght: ");
scanf("%d", &temp);
ans=(temp-32)*5/9;
printf("%dF celsies is = %fC \n", temp, ans);
}
else
{
printf("Enter temperature in celsies: ");
scanf("%d", &temp);
ans=temp*(9/5)+32;
printf("%dC celsies is = %fF",temp, ans);
}
getch();
}
#include <conio.h>
main()
{
char scale;
int temp=0;
float ans;
printf("Enter F to convert Farnhieght to CELSIES.\nEnter C to convert Celcies to farnhiegh.");
scale=getche();
printf("\n");
if(scale=='F' || scale=='f')
{
printf("Enter temperature in farnhieght: ");
scanf("%d", &temp);
ans=(temp-32)*5/9;
printf("%dF celsies is = %fC \n", temp, ans);
}
else
{
printf("Enter temperature in celsies: ");
scanf("%d", &temp);
ans=temp*(9/5)+32;
printf("%dC celsies is = %fF",temp, ans);
}
getch();
}