我怎么这么菜


私信TA

用户名:xujingcheng

访问量:16960

签 名:

Break Away

等  级
排  名 720
经  验 3770
参赛次数 4
文章发表 44
年  龄 10
在职情况 学生
学  校 NUAA
专  业

  自我简介:

毕业前学一下编程, 嗯! 是这样。

#include<stdio.h>
int main()
{
    int scores[1000],score,i=0,j,excellent=0,pass=0,unpass=0;
    while(scanf("%d",&score)!=EOF&&score>0)
        scores[i++]=score;
    for(j=0;j<i;j++)
    {
        if(scores[j]>=85) excellent++;
        else if(scores[j]>=60&&scores[j]<85) pass++;
        else unpass++;
        }
    printf(">=85:%d\n60-84:%d\n<60:%d\n",excellent,pass,unpass);
    return 0;
}
 

0.0分

0 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区