#include stdiohint main int N; scanfd &N; char name4; int breathRate pulse; for int i = 0; i N; i++ scanfs d d name &breathRate &pulse; if breathRate 15 breathRate 2
#include <stdio.h>
int main() { int N; // 用于存储输入的测试用例数量 scanf("%d", &N); // 输入测试用例数量
char name[4]; // 用于存储姓名的字符数组,长度为4,可以存储最长为3个字符的姓名
int breathRate, pulse; // 用于存储呼吸率和脉搏的整数变量
for (int i = 0; i < N; i++) {
// 循环N次,读取每个测试用例的姓名、呼吸率和脉搏
scanf("%s %d %d", name, &breathRate, &pulse);
// 判断呼吸率和脉搏是否超出正常范围
if (breathRate < 15 || breathRate > 20 || pulse < 50 || pulse > 70) {
// 如果超出正常范围,输出姓名
printf("%s\n", name);
}
}
return 0;
原文地址: https://www.cveoy.top/t/topic/iwHM 著作权归作者所有。请勿转载和采集!