|
|
back to boardCompilation error #include <stdio.h> const int M=99999999; bool fun(int a,int b); int main(){ int N; scanf("%d",&N); int i; int Q=1; for(i=0;i<M;i++){ if(fun(i,N)==1){ printf("%d",i); break; } if(i==M-1){ printf("%d",-1); break;} }
} bool fun(int a,int b){ int sum=1; while(a){ sum*=a%10; a/=10; } if(sum==b) return 1; else return 0; } why I get compil.error? in Dev-C++ it works :( Re: Compilation error Posted by Michael 14 Mar 2011 20:32 Bool is not included in the standard C99. You need to change "bool" in "int". |
|
|