鱼C论坛

 找回密码
 立即注册
查看: 2276|回复: 3

[已解决]问题到底出在哪里了呢

[复制链接]
发表于 2018-6-5 16:04:55 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
#include <stdio.h>

double pingjunfen, zuigao, zuidi;

double fenshu(double b[10]);


void main()
{
        printf("请输入学生成绩: \n");
        int a[10];
        int i;

        for(i=0; i < 10; i++)
        {
                scanf("%d",&a[i]);
        }

        for(i=0; i < 10; i++)
        {
                printf("%d  ",a[i]);
        }



}


--------------------Configuration: textp - Win32 Debug--------------------
Compiling...
text.c
F:\C例题\textp\text.c(11) : error C2143: syntax error : missing ';' before 'type'
F:\C例题\textp\text.c(12) : error C2143: syntax error : missing ';' before 'type'
F:\C例题\textp\text.c(14) : error C2065: 'i' : undeclared identifier
F:\C例题\textp\text.c(16) : error C2065: 'a' : undeclared identifier
F:\C例题\textp\text.c(16) : error C2109: subscript requires array or pointer type
F:\C例题\textp\text.c(16) : error C2102: '&' requires l-value
F:\C例题\textp\text.c(21) : error C2109: subscript requires array or pointer type
执行 cl.exe 时出错.

text.obj - 1 error(s), 0 warning(s)
最佳答案
2018-6-5 16:36:32
  1. #include <stdio.h>

  2. double pingjunfen, zuigao, zuidi;

  3. double fenshu(double b[10]);


  4. void main()
  5. {
  6.                 int a[10];
  7.         int i;

  8.         printf("请输入学生成绩: \n");

  9.         for(i=0; i < 10; i++)
  10.         {
  11.                 scanf("%d",&a[i]);
  12.         }

  13.         for(i=0; i < 10; i++)
  14.         {
  15.                 printf("%d  ",a[i]);
  16.         }



  17. }
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

发表于 2018-6-5 16:36:32 | 显示全部楼层    本楼为最佳答案   
  1. #include <stdio.h>

  2. double pingjunfen, zuigao, zuidi;

  3. double fenshu(double b[10]);


  4. void main()
  5. {
  6.                 int a[10];
  7.         int i;

  8.         printf("请输入学生成绩: \n");

  9.         for(i=0; i < 10; i++)
  10.         {
  11.                 scanf("%d",&a[i]);
  12.         }

  13.         for(i=0; i < 10; i++)
  14.         {
  15.                 printf("%d  ",a[i]);
  16.         }



  17. }
复制代码
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-6-5 16:41:42 | 显示全部楼层

为啥复制你的就没事,我也没看改啥东西啊
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-6-5 17:09:49 | 显示全部楼层
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2025-6-9 18:31

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表