3.程序流程图
4.代码实现
#include<bits/stdc++.h> using namespace std; main() { int x, y, z, num=0; printf(" Men Women Children\n"); for(x=0;x<=10;x++) { y=20-2*x; z=30-x-y; if(3*x+2*y+z == 50) printf("%2d:%4d%5d%6d\n", ++num,x,y,z); } }
5.测试截图
标签:std,num,namespace,5.24,打卡,main From: https://www.cnblogs.com/binglinll/p/17429237.html