#include "stdafx.h"
#include "stdio.h"
#include "math.h"
#include "conio.h"
//已知x+2y+z=16,求x,y,z的正偶数。
int main()
{
int x=0;
int y=0;
int z=0;
for (x = 0; x <= 16; x++)
{if(x%2==0)
for (y = 0; y <= 8; y++)
{
if(y%2==0)
{
z = 16 - x - 2 * y;
if (z>=0 && z % 2 == 0)
printf("x=%d\ny=%d\nz=%d\n\n", x, y, z);
}
}
}
getch();
return 0;
}