填空题B-PM2.5指数标准
时间: 1ms 内存:128M
描述:
注:本题只需要提交标记为修改部分之间的代码,请按照C++方式提交。
PM2.5指数为0-35,空气质量为优。
PM2.5指数为36-75,空气质量为良。
PM2.5指数为76以上,空气质量为污染。
给出n天的PM2.5指数,请按照分类标准,给出每种PM2.5级别的天数。#include <iostream>
using namespace std;
int main()
{
int n1=0,n2=0,n3=0;
int i,n,PM25;
cin>>n;
for(i=1; i<=n; i++)
{
cin>>PM25;
/*
请填写该部分代码
*/
}
cout<<"优:"<<n1<<endl;
cout<<"良:"<<n2<<endl;
cout<<"污染:"<<n3<<endl;
return 0;
}
输入:
n和n天的PM2.5指数
输出:
空气质量为优、良、污染的天数
示例输入:
8
100 20 30 50 70 60 25 80
示例输出:
优:3
良:3
污染:2
提示:
参考答案:
文章评论