标签:
2 female 4.5 4.0 115 37 200 male 3.9 3.5 155 36 301
normal 3
1 #include<iostream> 2 using namespace std; 3 4 struct ill { 5 string sex; 6 double WBC; 7 double RBC; 8 int HGB; 9 int HCT; 10 int PLT; 11 }; 12 ill test[100+5]; 13 14 int main() { 15 int k; 16 cin >> k; 17 for(int i=0; i<k; i++) { 18 cin >> test[i].sex >> test[i].WBC >> test[i].RBC >> test[i].HGB 19 >> test[i].HCT >>test[i].PLT; 20 int tot=0; 21 if(test[i].WBC > 10 || test[i].WBC < 4) tot++; 22 if(test[i].RBC > 5.5 || test[i].RBC < 3.5) tot++; 23 if(test[i].HGB > 160 || test[i].HGB < 110 24 || (test[i].HGB < 120 && test[i].sex == "male") 25 || (test[i].HGB > 150 && test[i].sex == "female")) tot++; 26 if(test[i].HCT > 48 || test[i].HCT < 36 27 || (test[i].HCT < 42 && test[i].sex == "male") 28 || (test[i].HCT > 40 && test[i].sex == "female")) tot++; 29 if(test[i].PLT > 300 || test[i].PLT < 100) tot++; 30 if(tot) cout << tot << "\n"; 31 else cout << "normal\n"; 32 } 33 return 0; 34 }
标签:
原文地址:http://www.cnblogs.com/liangyongrui/p/4296764.html