#include<iostream>
using namespace std;
int main()
{
int a,b,c;
for(a=0;a<=30;a++)
{
for(b=0;b<=30;b++)
{
for(c=0;c<=30;c++)
{
if(a+b+c==30&&3*a+2*b+c==50)
{
int i;
i++;
cout <<i<<":"<<"男人:"<<a<<"女人:"<<b<<"小孩:"<<c<<endl;
}
}
}
}
}
标签:std,includeusing,cout,19,++,int From: https://www.cnblogs.com/guozi6/p/17392997.html