关系运算

注意: “=”和“= =”两个操作符不要混淆使用。
例:
x = somevalue;
if(x = = 9)
cout<<“x is not 0\n”;

若 if (x = 9)
cout<<“x is not 0\n”;
前者是有条件的执行输出语句,后者是无条件的执行输出语句。

posted @ 2020-10-19 19:57  Jerome丶yale  阅读(158)  评论(0编辑  收藏  举报