百钱买百鸡
[cpp]#include<iostream>using namespace std;int main(){int i,j,k;int x,y,z;cout<<"100钱能买:"<<endl;for(x=0;x<=20;x++)for(y=0;y<=33;y++)for(z=0;z<=300;z++){if(5*x+3*y+z/3==100 && x+y+z==100)cout<<x<<"只鸡翁"<<y<<"只鸡母"<<z<<"只鸡雏"<<endl;}return 0;}
补充:软件开发 , C++ ,