表达式(x<y)将被判定为bool值ture或false

来源:互联网 发布:数据库题库 编辑:程序博客网 时间:2024/04/30 05:43
#include "stdafx.h"#include<iostream>int _tmain(int argc, _TCHAR* argv[]){using namespace std;int x;cout<<"x="<<(x=100)<<endl;cout<<"now x="<<x<<endl;cout<<"the expression x<3 has the value:"<<(x<3)<<endl;cout<<"the expression x>3 has the value:"<<(x>3)<<endl;system("pause");return 0;}

0 0
原创粉丝点击