编程如下,本人是个学生,刚刚接触编程还请各位多多包涵
#include<bits/stdc++.h>
using namespace std;
int main()
{
int head,foot,chick,rabbit;
cout<<"头的数量:"<<endl;
cin>>head;
cout<<"脚的数量:"<<endl;
cin>>foot;
if(foot>=head2&&foot%2==0)
{
rabbit=(foot-2head)/2;
chick=head-rabbit;
cout<<"兔的数量="<<rabbit<<" "<<"鸡的数量=" <<chick<<endl;
return 0;
}
else
cout<<"脚的数量有误!"<<endl;
return 0;
}不知道为什么,运行完成后看不到结果,就直接结束程序
在C++里可以正常运行,但一保存为exe.形式就会出现问题
谢谢