为了账号安全,请及时绑定邮箱和手机立即绑定

请问哪里错了

#include <stdio.h>


void getmax(int score[])

{

    int max=score[0];

    int i;

    for(i = 0 ; i < 10; i++)

    {

        if(score[i]>max)

        {

            max=score[i];

        }

    printf("最高分:%d\n",max);

    }

    return max;

}    

void getmin(int score[])

{

    int min=score[0];

    int i;

    for(i = 0 ; i < 10 ; i++)

    {

        if(score[i]<min)

        {

            min=score[i];

        }

    printf("最低分:%d\n",min);

    }

    return min;

}

int main()

{

    int score[]={67,98,75,63,82,79,81,91,66,84};

    getmax(score);

    getmin(score);

    return 0;

}


正在回答

1 回答

void的函数不能return一个值,你的每个函数都有问题

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
C语言入门
  • 参与学习       926299    人
  • 解答问题       20799    个

C语言入门视频教程,带你进入编程世界的必修课-C语言

进入课程

请问哪里错了

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信