题目链接:https://pintia.cn/problem-sets/994805046380707840/problems/1111914599412858884
题目大意:判断给定的数的范围,输出不同的结果。
#include <iostream>
#include <algorithm>
#include <string>
#include <iomanip>
using namespace std;
int main(){
int n;
cin >> n;
while(n--){
int s,h,w;
cin >> s >> h >> w;
if(s==1){
if(h<130){
cout << "duo chi yu! ";
}else if(h==130){
cout << "wan mei! ";
}else{
cout << "ni li hai! ";
}
if(w<27){
cout << "duo chi rou!\n";
}else if(w==27){
cout << "wan mei!\n";
}else{
cout << "shao chi rou!\n";
}
}else{
if(h<129){
cout << "duo chi yu! ";
}else if(h==129){
cout << "wan mei! ";
}else{
cout << "ni li hai! ";
}
if(w<25){
cout << "duo chi rou!\n";
}else if(w==25){
cout << "wan mei!\n";
}else{
cout << "shao chi rou!\n";
}
}
}
return 0;
}