main ()
{int cocks=0, hens, chicks;
while (cocks<=19)
{hens=0;
while (hens<=33)
{chicks=100-cocks-hens;
if (5.0*cocks+3.0*hens+chicks/3.0==100.0)
printf (" %d %d %d\n", cocks, hens, chicks);
hens++;
}
cocks++;
}
}
这样一段代码.我的运行结果是 0 25 75
4 18 78
8 11 81
12 4 84
教程的运行结果是: 0 25 75
3 20 77
4 18 78
7 13 80
8 11 81
11 6 83
12 4 84
写的程序是和书上一样的.
这是怎么回事啊