Differences between revisions 5 and 6
Revision 5 as of 2005-08-13 12:50:51
Size: 807
Editor: 218
Comment:
Revision 6 as of 2005-08-13 12:51:21
Size: 809
Editor: 218
Comment:
Deletions are marked like this. Additions are marked like this.
Line 9: Line 9:

C programing 질문

피타고라스 정리를 컴파일 하려고 했더니 에러가 납니다. 에러 위치는 맨아래 닫는 중괄호 } 에서 나는데 왜 나는지 모르겠네요 소스 코드는 .c 로 저장 했고, 소프트웨어는 TurboC++3.1 로 했읍니다. 당연히 소스는 책에 있는걸 배꼈고...능력 미달이니깐

#include <stdio.h>

main() {

  • int a, b, c, n ; printf("maximum value= ?") ;

    scanf("%d", &n) ; printf("A\tB\tC\n") ; for(a=1;a<=n;a++){

    • for(b=1;b<=n;b++){

      • for(c=1;c<=n;c++){

        • if(a*a==b*b+c*c)
          • printf("%d\t%d\t%d\t\n", a, b, c);
        }
      }
    }

} 여기서 에러가 납니다

에러 메시지는 Function should return a value. 입니다.

그리고 내 로그인 패스워드를 잊어버렸어요....DrPepper

AnswerMe (last edited 2011-08-03 11:00:51 by localhost)

web biohackers.net