错在哪l啊 向高手求救!!
#include<iostream.h>void main()
{
int m,n,x=88,a1,a2;
cout<<"设置密码为"<<endl;
cin>>m;
cout<<"请输入密码"<<endl;
cin>>n;
a1=m^x;a2=a1^n;
if (a2=x)
cout<<"密码right"<<endl;
else
cout<<"密码wrong"<<endl;
}
不知道为什么,无论输入M,N指是多少,最后总显示"密码right" why? tell me why!!