1 #include<stdio.h> 2 int main() 3 { 4 int cock,hen,chicken; 5 for(cock=0;cock<=20;cock++) 6 for(hen=0;hen<=33;hen++) 7 for(chicken=0;chicken<=100;chicken++) 8 { 9 if((5*cock+3*hen+chicken/3.0==100)&&(cock+hen+chicken==100)) 10 printf("cock=%2d,hen=%2d,chicken=%2d\n",cock,hen,chicken); 11 } 12 }
标签:int,Day,hen,include,cock,chicken From: https://www.cnblogs.com/wan123-1122/p/17311840.html