level 9
改一下
if(4*r +2*c == f)
{
printf("鸡数:%d,兔数:%d",c,r);
break;
}
同时你的程序没有无结果的情况。
2017年09月21日 13点09分
2
level 7
建议楼主注意一下空格,尽量让程序看起来好看一点。
还有,,,请尽量发程序代码,别发图。。。
2017年09月21日 13点09分
4
level 4
#include <iostream>
using namespace std;
int main()
{
int ji, tu,h,t;
cout<<"请输入:"<<endl<<"头的数量";
cin>>h;
cout<<"腿的数量";
cin>>t;
for(tu=0;tu<=h;tu++)
{
ji=h-tu;
if(4*tu+2*ji==t)
break;}
cout<<"鸡的数量"<<ji<<"兔的数量"<<tu;
return 0;
}
2017年09月23日 14点09分
6