2_10.cpp

来自「清华大学C++补充习题代码」· C++ 代码 · 共 25 行

CPP
25
字号
//2_10.cpp
#include <iostream>
using namespace std;

int main()
{
	int x;
	int y;
	x=5;
	y=6;
	if (x==5)
		cout<<"The value of x is:"<<x<<endl;
	else
		cout<<"The value of x is not:"<<x<<endl;
	if (y=8)
		cout<<"The value of y is:"<<y<<endl;
	else
		cout<<"The value of y is not:"<<y<<endl;
	return 0;
}
/*
程序运行结果为:
The value of x is:5
The value of y is:8
*/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?