fengzi


私信TA

用户名:916123

访问量:4360

签 名:

生死看淡,不服来战!

等  级
排  名 15808
经  验 782
参赛次数 0
文章发表 7
年  龄 18
在职情况 学生
学  校 中国石油大学
专  业 机械设计制造及自动化

  自我简介:

解题思路:


  参考代码。


注意事项:


输出放的位置。



参考代码:

#include<stdio.h>

#include <math.h>

#include <string.h>

#define N 10



int main()

{

    int x=0,y=0,z=0,n;

    while(1)

    {

        scanf("%d",&n);

        if(n<=0)

        {

             printf(">=85:%d\n",x);

             printf("60-84:%d\n",y);

             printf("<60:%d\n",z);

            return 0;

        }

        if(n>=85)

        {

            x++;

        }

        else if(n>=60)

        {

            y++;

        }

        else

        {

            z++;

        }

    }


    return 0;

}


 

0.0分

0 人评分

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

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区