Differences between revisions 11 and 12
Revision 11 as of 2005-08-13 13:01:58
Size: 1109
Editor: 218
Comment:
Revision 12 as of 2005-08-13 13:02:19
Size: 1111
Editor: 218
Comment:
Deletions are marked like this. Additions are marked like this.
Line 45: Line 45:
해결 됬습니다. make exe를 써야 하는데 compile 을 써서 에러가 났었네요----DrPepper 해결 됬습니다. make exe를 써야 하는데 compile 을 써서 에러가 났었네요......DrPepper

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

해결 됬습니다. make exe를 써야 하는데 compile 을 써서 에러가 났었네요......DrPepper

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

web biohackers.net