常量:用于记录程序中不可更改的数据
1.#define 宏常量
格式:#define 常量名 常量值
2.const修饰的变量 const 数据类型 常量名 = 常量值
#include <iostream>
using namespace std;
#define Day 7
int main()
{
cout << "一周总共有: " << Day << "天" << endl;
const int month = 31;
cout << "七月有:" << month << "天" << endl;
system("pause");
return 0;
}