题解
2023-03-17 21:24:03
发布于:江苏
69阅读
0回复
0点赞
#include <iostream>
using namespace std;
int a,cnt;
struct node
{
    string patient_name;
    double body_temperature;
    bool is_cough;
}b[205];
int main()
{
    cin>>a;
    for(int i=1;i<=a;i++)
	{
        cin>>b[i].patient_name;
        cin>>b[i].body_temperature;
        cin>>b[i].is_cough;
    }
    for(int i=1;i<=a;i++)
	{
		if(b[i].body_temperature>=37.5&&b[i].is_cough!=0)
		{
            cout<<b[i].patient_name<<endl;
            cnt++;
        }
    }
    cout<<cnt;
    return 0; 
}
这里空空如也

有帮助,赞一个