4elist0204.cpp

来自「《21天学通C++》附盘的原代码。书上的每个例子在这里都有相应的C语言程序。」· C++ 代码 · 共 25 行

CPP
25 行
字号
// Listing 2.3 - using namespace std
#include <iostream>
int main()
{
	using namespace std;

	cout << "Hello there.\n";
	cout << "Here is 5: " << 5 << "\n";
	cout << "The manipulator endl ";
	cout << "writes a new line to the screen.";
	cout <<  endl;
	cout << "Here is a very big number:\t" << 70000;
	cout <<  endl;
	cout << "Here is the sum of 8 and 5:\t";
	cout << 8+5 << endl;
	cout << "Here's a fraction:\t\t";
	cout << (float) 5/8 << endl;
	cout << "And a very very big number:\t";
	cout << (double) 7000 * 7000 << endl;
	cout << "Don't forget to replace Jesse Liberty";
	cout << "with your name...\n";
	cout << "Jesse Liberty is a C++ programmer!\n";
	return 0;
}

⌨️ 快捷键说明

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