酷代码 AI
菜单
服务商

C 语言实现:依据国家标准为 8 岁宝宝身高体重提供营养建议

```c #include <stdio.h> int main() { int n; scanf("%d", &n); while (n--) { int gender, height, weight; scanf("%d %d %d", &gender, &height, &weight); if (gender == 1) { if (height < 130) printf("duo chi yu!"); else if (height == 130) printf("wan mei!"); else printf("ni li hai!"); printf(" "); if (weight < 27) printf("duo chi rou!"); else if (weight == 27) printf("wan mei!"); else printf("shao chi rou!"); } else { if (height < 129) printf("duo chi yu!"); else if (height == 129) printf("wan mei!"); else printf("ni li hai!"); printf(" "); if (weight < 25) printf("duo chi rou!"); else if (weight == 25) printf("wan mei!"); else printf("shao chi rou!"); } printf("\n"); } return 0; } ``` ######[AI写代码神器 | 760点数解答 | 2024-10-31 11:19:21]

相关提问
本站限时免费提问中
实用工具查看更多
Linux在线手册 [开发类]
Jquery在线手册 [开发类]
今日油价 [生活类]
图片互转base64 [开发类]
时间转换器 [开发类]