#include<stdio.h>
int main()
{
int x, y, z, number=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", ++number, x, y, z);
}
return 0;
}
#include<stdio.h>
int main()
{
int x, y, z, number=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", ++number, x, y, z);
}
return 0;
}