爆零求助……
查看原帖
爆零求助……
996070
0_and_1楼主2023/8/4 22:54
//啊?这不应该是结构体的题目吗?怎么会分到函数与递归呢? 
#include<iostream>
#include<string>
using namespace std;
struct Info
{
	string name;
	float temp;
	int cough;
}person[205];

int main()
{
 	std::ios::sync_with_stdio(0);cin.tie(0);
 	int n,cnt=0;
 	cin >> n;
 	for(int i = 0;i<n;i++)cin >> person[i].name >> person[i].temp >> person[i].cough;
 	for(int i = 0;i<n;i++)
 	{
 		if((person[i].temp>=37.5)&&(person[i].cough==1))
 		cout << person[i].name << endl;
 		cnt++;
 	}
 	cout << cnt;
	return 0;
}
2023/8/4 22:54
加载中...