小于哥的鱼干


私信TA

用户名:yuhui1207

访问量:16846

签 名:

在人间已是巅,何苦要上青天

等  级
排  名 400
经  验 4873
参赛次数 2
文章发表 32
年  龄 24
在职情况 在职
学  校 常熟理工
专  业

  自我简介:

解题思路:

注意事项:

参考代码:

#include <stdio.h>
int main()
{
  int i=0,j;
  int a=0,b=0,c=0;
  int arr[10086];
  while(1)
  {
    scanf("%d",&arr[i]);
    if(arr[i]<=0)
      break;
    i++;
  }
  for(j=0;j<i;j++)
  {
    if(arr[j]>=85)
      a++;
    else if(arr[j]>=60&&arr[j]<=84)
      b++;
    else
      c++;
  }
  printf(">=85:%d\n",a);
  printf("60-84:%d\n",b);
  printf("<60:%d\n",c);
  return 0;
}


 

0.0分

0 人评分

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

编程语言转换

万能编程问答

代码解释器

  评论区