下面一段比较两个数大小的程序,不管我输入的是什么数字,总是输出x=y,想不明白哪里错了#include using namespace std;int main(){int x,y;coutx>>y;if (x=y)cout

来源:学生作业帮助网 编辑:六六作业网 时间:2024/05/23 22:12:21
下面一段比较两个数大小的程序,不管我输入的是什么数字,总是输出x=y,想不明白哪里错了#includeusingnamespacestd;intmain(){intx,y;coutx>>y;if

下面一段比较两个数大小的程序,不管我输入的是什么数字,总是输出x=y,想不明白哪里错了#include using namespace std;int main(){int x,y;coutx>>y;if (x=y)cout
下面一段比较两个数大小的程序,不管我输入的是什么数字,总是输出x=y,想不明白哪里错了
#include
using namespace std;
int main(){
int x,y;
coutx>>y;
if (x=y)
cout

下面一段比较两个数大小的程序,不管我输入的是什么数字,总是输出x=y,想不明白哪里错了#include using namespace std;int main(){int x,y;coutx>>y;if (x=y)cout
x=y在C语言里表示把y的值给x
改成x==y,试试