记录详情

Compile Error

/in/foo.c: In function 'printDigits':
/in/foo.c:17:33: warning: implicit declaration of function 'pow' [-Wimplicit-function-declaration]
         int digit = temp / (int)pow(10, digitCount - 1 - i);
                                 ^~~
/in/foo.c:17:33: warning: incompatible implicit declaration of built-in function 'pow'
/in/foo.c:17:33: note: include '<math.h>' or provide a declaration of 'pow'
/in/foo.c:19:9: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
         printf("%d", digit);
         ^~~~~~
/in/foo.c:19:9: warning: incompatible implicit declaration of built-in function 'printf'
/in/foo.c:19:9: note: include '<stdio.h>' or provide a declaration of 'printf'
/in/foo.c:27:5: warning: incompatible implicit declaration of built-in function 'printf'
     printf("\n");
     ^~~~~~
/in/foo.c:27:5: note: include '<stdio.h>' or provide a declaration of 'printf'
/in/foo.c: At top level:
/in/foo.c:29:2: error: stray '#' in program
 }#include <stdio.h>
  ^
/in/foo.c:29:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token
 }#include <stdio.h>
           ^
/in/foo.c: In function 'main':
/in/foo.c:43:5: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
     scanf("%d", &num);
     ^~~~~
/in/foo.c:43:5: warning: incompatible implicit declaration of built-in function 'scanf'
/in/foo.c:43:5: note: include '<stdio.h>' or provide a declaration of 'scanf'
/in/foo.c:47:5: warning: incompatible implicit declaration of built-in function 'printf'
     printf("%d\n", digitCount);
     ^~~~~~
/in/foo.c:47:5: note: include '<stdio.h>' or provide a declaration of 'printf'

信息

递交者
类型
自测
语言
C
递交时间
2024-11-15 17:26:07
评测时间
2024-11-15 17:26:07
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes