yeqian

  • 常量不可更改
  • const修饰的变量也称为常量
点击查看代码
#include<iostream>
#include<string>

using namespace std;

//常量的定义方式 
// 1、#define宏常量 
#define WEEK 7
// 2、const修饰的变量,const修饰的变量也称为常量
const int month = 12;

int main()
{
	cout << WEEK << "天" << endl;
	cout << month << "月" << endl;

	system("pause");

	return 0;
}

分类:

技术点:

相关文章:

  • 2021-12-23
  • 2021-12-23
  • 2021-12-12
  • 2021-12-23
猜你喜欢
  • 2021-12-23
  • 2022-12-23
  • 2022-01-02
  • 2022-01-02
  • 2021-12-23
  • 2021-12-23
  • 2022-12-23
相关资源
相似解决方案