#include <stdio.h>
#include <stdlib.h>
double Cel(double num1);
double Fah(double num2);
int main(void)
{
int num1;
double n1;
printf("1.섭씨를 화씨로 2.화씨를 섭씨로\n");
printf("선택>>");
scanf("%d",&num1);
if(num1==1)
{
printf("섭씨입력:");
scanf("%lf",&n1);
printf("화씨:%lf",Cel(n1));
}
else if(num1==2)
{
printf("화씨입력:");
scanf("%lf",&n1);
printf("섭씨:%lf",Fah(n1));
}
else
printf("1하고 2만해\n");
system("pause");
return 0;
}
double Cel(double num1)
{
return 1.8*num1+32;
}
double Fah(double num2)
{
return (num2-32)/1.8;
}