list0204.cpp

来自「teach yourself C++ in 21 days 第五版」· C++ 代码 · 共 26 行

CPP
26
字号
// Listing 2.4 - 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 + -
显示快捷键?