kk


私信TA

用户名:bujidao

访问量:2202

签 名:

等  级
排  名 3440
经  验 1850
参赛次数 1
文章发表 11
年  龄 0
在职情况 待业
学  校 学校
专  业

  自我简介:

TA的其他文章

解题思路:

注意事项:

参考代码:
#include<stdio.h>
int main()
{
int x,y,s,a[6]={0};
scanf("%d",&x);
do
{
scanf("%d",&s);
s/=10;
if(s==10||s==9)
{
a[0]++;
}
else if(s==8)
{
a[1]++;
}
else if(s==7)
{
a[2]++;
}
else if(s==6)
{
a[3]++;
}
else 
{
a[4]++;
}
}while(--x);
scanf("%d",&y);
switch(y)
{
case 1:printf("%d",a[0]);break;
case 2:printf("%d",a[1]);break;
case 3:printf("%d",a[2]);break;
case 4:printf("%d",a[3]);break;
case 5:printf("%d",a[4]);break;
}
return 0;
}


 

0.0分

0 人评分

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

编程语言转换

万能编程问答

代码解释器

  评论区