int a,b,c,d,e,f,j,t;
cout<<"第一种生物的腿数?";
cin>>a;
cout<<"第二种生物的腿数?";
cin>>b;
cout<<"头数?";
cin>>c;
cout<<"腿数?";
cin>>e;
d=c*b;
f=e-d;
t=f/(a-b);
j=c-t;
if(j<0||t<0){
cout<<"输入错误";
}else{
cout<<"鸡有"<<j<<"只"<<endl;
cout<<"兔有"<<t<<"只"<<endl;
}
}
已有账号? 立即登录
????