😎C++--常量定义2
2019-05-23 本文已影响0人
JiehongYOU
const 声明 常量
#include <iostream>
using namespace std;
int main(void) {
const int LENGTH = 20;
const int WIDTH = 10;
int area = WIDTH * LENGTH;
cout << "Area is:" << area;
system("pause");
return 0;
}
结果
![](https://img.haomeiwen.com/i17701595/a0a3513df42b2b59.png)