gpt4 book ai didi

c - 用这个简单的代码发现错误?

转载 作者:太空宇宙 更新时间:2023-11-04 07:09:14 25 4
gpt4 key购买 nike

<分区>

我在这些线路上停留了将近一个小时。有人可以帮我检查代码吗?

#include <stdio.h>
#define NUM 20;
int main(void)
{
int fckingshit[NUM],i;
printf("Enter 20 integers now: ");
for(i=0;i<NUM;i++)
scanf("%d",&fckingshit[i]);
return 0;
}

我在下面收到错误消息。

test.c: In function 'main':
test.c:5: error: expected ']' before ';' token
test.c:7: error: 'i' undeclared (first use in this function)
test.c:7: error: (Each undeclared identifier is reported only once
test.c:7: error: for each function it appears in.)
test.c:7: error: expected expression before ';' token
test.c:8: error: 'fckingshit' undeclared (first use in this function)

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com