标签:print clu .com ima amp images bsp printf bre
/*百鸡问题*/
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
int x,y,z;
printf("\n");
for(x=1;x<20;++x)
{
for(y=1;y<33;y++)
{
z=100-x-y;
if((z%3==0)&&((5*x+3*y+z/3)==100))
break;
}
if(x&&y&&z&&y<34)
{
printf("cook=%d hen=%d chicken=%d\n",x,y,z);
}
}
system("PAUSE");
return 0;
}
标签:print clu .com ima amp images bsp printf bre
原文地址:http://www.cnblogs.com/hgr123456/p/6671205.html