引入头文件 #include 标准输入输出流
使用标准命名空间 using namespace std;
标准输出流对象 cout << “…” << 1234 << 3.14 << endl;

#include <iostream>  //标准输入输出流   i - input  输入  o - output 输出  stream 流  相当于 stdio.h
using namespace std; //使用  标准  命名空间  


//#include <time.h>
//#include <ctime>
//
//#include <math.h>
//#include <cmath>


//程序入口函数
int main()
{
	// cout  标准输出流对象
	// << 左移  在C++下有了新的寓意  用于在cout后拼接输出的内容   
	// endl   --- end line  刷新缓冲区 并且换行  
	cout << "hello world"  << 123 << endl;

	system("pause");  //阻塞
	return EXIT_SUCCESS;  //返回正常退出
}
  • 1.
  • 2.
  • 3.
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.