함수 질문입니다.
우수리
2023.04.01
질문 제목 : 함수 질문입니다.
#include stdio.h
void Celesius(void)
{ // 이부분에서 빨간줄 뜨고 에러가 납니다
void GetCelsius(float *celsius)
{
printf(Enter the temperature in celsius : );
scanf(%f , celsius);
}
void CeltoFa(float *fahrenheit, float *celsius)
{
*fahrenheit = 32 + (*celsius * (180.0/100));
}
void PrintFa(float celsius, float fahrenheit)
{
printf(Celsius temperature is %.1f\n , (float)celsius);
printf(Fahrenheit temperature is %.1f\n\n , fahrenheit);
}
}
void main()
{
float fahrenheit , celsius;
Celesius(); //섭씨
}
메인 함수에는 한개의 함수만.. 그리고 3개의 짜잘한 함수가 그안에 들어가게 하려구 합니다..
-
천사의눈물
함수호출을 다시한번 읽어보셔야 할거같아요^^
-
과꽃
C/C++언어에서는 함수 안에 함수를 정의할 수 없습니다.
-
캐릭터
개념적으로 함수 안에 함수선언이 가능한가요?...