| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1179 人关注过本帖
标题:提示有一个错误,找不到?
只看楼主 加入收藏
w天然呆x
Rank: 1
等 级:新手上路
帖 子:30
专家分:5
注 册:2013-4-20
结帖率:66.67%
收藏
已结贴  问题点数:20 回复次数:7 
提示有一个错误,找不到?
#include<stdio.h>
int main()
{
   
    printf("                   MENU                 \n");
    printf("=========================================\n");
    printf("1.input the students'nameS and scores\n");
    printf("2.search scores of some students\n");
    printf("3.modify scores of some students\n");
    printf("4.list all students'scores\n");
    printf("5.quit the system\n");
    printf("=========================================\n");
    int i,j;
    char name[20]char id[20];int ENGLISH[5]int math[5]int chinese[5];
    printf("please input your choice(1-5):");
    scanf("%d",&i);
    switch(i)
    {
    case 1:printf("===MENU 1.input the students'nameS and scores===\n===  please input the students'information  ===\n");
        printf("name:");
        for(j=0;j<20;j++)
            scanf("%c",&name[j]);
        printf("\nid:");
        for(j=0;j<20;j++)
            scanf("%c",&id[j]);
        printf("\nENGLISH:");
        for(j=0;j<5;j++)
            scanf("%d",&ENGLISH[J]);
        printf("\nmath:");
        for(j=0;j<5;j++)
            scanf("%d",&math[j]);
        printf("\nchinese:");
        for(j=0;j<5;j++)
            scanf("%d",&chinese[j]);
        printf("\n");
        break;
    case 4:printf("===MENU 4.list all students'scores===\n");
        for(j=0;j<20;j++)
            printf("%c\n",name[j]);
        for(j=0;j<20;j++)
            printf("%c\n",id[j]);
        for(j=0;j<5;j++)
            printf("%d\n",ENGLISH[J]);
        for(j=0;j<5;j++)
            printf("%d\n",math[j]);
        for(j=0;j<5;j++)
            printf("%d\n",chinese[j]);


    }
}
搜索更多相关主题的帖子: all include system scores 
2013-05-22 14:23
rjsp
Rank: 20Rank: 20Rank: 20Rank: 20Rank: 20
等 级:版主
威 望:528
帖 子:9007
专家分:53942
注 册:2011-1-18
收藏
得分:5 
先别忙,先学会怎么提问题吧

char name[20]char id[20];int ENGLISH[5]int math[5]int chinese[5];
编译器报错:error C2144: syntax error : 'char' should be preceded by ';'

for(j=0;j<5;j++)
    scanf("%d",&ENGLISH[J]);
编译器报错:'J' : undeclared identifier
2013-05-22 14:26
w天然呆x
Rank: 1
等 级:新手上路
帖 子:30
专家分:5
注 册:2013-4-20
收藏
得分:0 
提示有一个错误,可是下面却列出来了不下二十个error,我也是木办法!
2013-05-22 14:58
w天然呆x
Rank: 1
等 级:新手上路
帖 子:30
专家分:5
注 册:2013-4-20
收藏
得分:0 
这是编译器报的错--------------------Configuration: dfdgd - Win32 Debug--------------------
Compiling...
1.c
F:\dfdgd\1.c(13) : error C2143: syntax error : missing ';' before 'type'
F:\dfdgd\1.c(14) : error C2143: syntax error : missing ';' before 'type'
F:\dfdgd\1.c(14) : error C2143: syntax error : missing ';' before 'type'
F:\dfdgd\1.c(16) : error C2065: 'i' : undeclared identifier
F:\dfdgd\1.c(22) : error C2065: 'name' : undeclared identifier
F:\dfdgd\1.c(22) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(22) : error C2102: '&' requires l-value
F:\dfdgd\1.c(25) : error C2065: 'id' : undeclared identifier
F:\dfdgd\1.c(25) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(25) : error C2102: '&' requires l-value
F:\dfdgd\1.c(28) : error C2065: 'ENGLISH' : undeclared identifier
F:\dfdgd\1.c(28) : error C2065: 'J' : undeclared identifier
F:\dfdgd\1.c(28) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(28) : error C2102: '&' requires l-value
F:\dfdgd\1.c(31) : error C2065: 'math' : undeclared identifier
F:\dfdgd\1.c(31) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(31) : error C2102: '&' requires l-value
F:\dfdgd\1.c(34) : error C2065: 'chinese' : undeclared identifier
F:\dfdgd\1.c(34) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(34) : error C2102: '&' requires l-value
F:\dfdgd\1.c(39) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(41) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(43) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(45) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(47) : error C2109: subscript requires array or pointer type
执行 cl.exe 时出错.

1.obj - 1 error(s), 0 warning(s)
2013-05-22 15:00
peach5460
Rank: 15Rank: 15Rank: 15Rank: 15Rank: 15
来 自:武汉
等 级:贵宾
威 望:30
帖 子:2780
专家分:6060
注 册:2008-1-28
收藏
得分:5 
以下是引用w天然呆x在2013-5-22 15:00:02的发言:

这是编译器报的错--------------------Configuration: dfdgd - Win32 Debug--------------------
Compiling...
1.c
F:\dfdgd\1.c(13) : error C2143: syntax error : missing ';' before 'type'
F:\dfdgd\1.c(14) : error C2143: syntax error : missing ';' before 'type'
F:\dfdgd\1.c(14) : error C2143: syntax error : missing ';' before 'type'
F:\dfdgd\1.c(16) : error C2065: 'i' : undeclared identifier
F:\dfdgd\1.c(22) : error C2065: 'name' : undeclared identifier
F:\dfdgd\1.c(22) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(22) : error C2102: '&' requires l-value
F:\dfdgd\1.c(25) : error C2065: 'id' : undeclared identifier
F:\dfdgd\1.c(25) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(25) : error C2102: '&' requires l-value
F:\dfdgd\1.c(28) : error C2065: 'ENGLISH' : undeclared identifier
F:\dfdgd\1.c(28) : error C2065: 'J' : undeclared identifier
F:\dfdgd\1.c(28) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(28) : error C2102: '&' requires l-value
F:\dfdgd\1.c(31) : error C2065: 'math' : undeclared identifier
F:\dfdgd\1.c(31) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(31) : error C2102: '&' requires l-value
F:\dfdgd\1.c(34) : error C2065: 'chinese' : undeclared identifier
F:\dfdgd\1.c(34) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(34) : error C2102: '&' requires l-value
F:\dfdgd\1.c(39) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(41) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(43) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(45) : error C2109: subscript requires array or pointer type
F:\dfdgd\1.c(47) : error C2109: subscript requires array or pointer type
执行 cl.exe 时出错.

1.obj - 1 error(s), 0 warning(s)

2楼的提示不是很明显了吗?
你还有什么不懂的?

我总觉得授人以鱼不如授人以渔...
可是总有些SB叫嚣着:要么给代码给答案,要么滚蛋...
虽然我知道不要跟SB一般见识,但是我真的没修炼到宠辱不惊...
2013-05-22 21:38
邓士林
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
来 自:淮河河畔
等 级:贵宾
威 望:61
帖 子:2392
专家分:13384
注 册:2013-3-3
收藏
得分:5 
都那么多啊

Maybe
2013-05-22 21:50
w天然呆x
Rank: 1
等 级:新手上路
帖 子:30
专家分:5
注 册:2013-4-20
收藏
得分:0 
jhkl
2013-05-22 22:37
pangding
Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19Rank: 19
来 自:北京
等 级:贵宾
威 望:94
帖 子:6784
专家分:16751
注 册:2008-12-20
收藏
得分:5 
以下是引用w天然呆x在2013-5-22 22:37:17的发言:

jhkl

看见 jkhl 的总觉得是 vi 党。
2013-05-28 13:09
快速回复:提示有一个错误,找不到?
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.017407 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved