/ 科创班 /

记录详情

Compile Error

/in/foo.c:1:2: error: invalid preprocessing directive #inlcude
 #inlcude<stdio.h>
  ^~~~~~~
/in/foo.c: In function 'main':
/in/foo.c:5:4: warning: implicit declaration of function 'scanf' [-Wimplicit-function-declaration]
    scanf("%d", &a);
    ^~~~~
/in/foo.c:5:4: warning: incompatible implicit declaration of built-in function 'scanf'
/in/foo.c:5:4: note: include '<stdio.h>' or provide a declaration of 'scanf'
/in/foo.c:8:4: warning: implicit declaration of function 'printf' [-Wimplicit-function-declaration]
    printf("%d", total);
    ^~~~~~
/in/foo.c:8:4: warning: incompatible implicit declaration of built-in function 'printf'
/in/foo.c:8:4: note: include '<stdio.h>' or provide a declaration of 'printf'

代码

#inlcude<stdio.h>
int main()
{
   int a, total=1;
   scanf("%d", &a);
   for (int i=a; i>0; i--)
       total *= i;
   printf("%d", total);
   return 0;
}

信息

递交者
类型
递交
题目
求阶乘
题目数据
下载
语言
C
递交时间
2018-06-17 18:15:46
评测时间
2018-06-17 18:15:46
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes