This commit is contained in:
2026-02-23 20:46:42 +08:00
commit c5f2ebb5d6
15 changed files with 484 additions and 0 deletions

22
字面常量.cpp Normal file
View File

@@ -0,0 +1,22 @@
//
// Created by viole on 2026/2/15.
//
#include "iostream"
//#include "windows.h"
using namespace std;
#define FAT_BMI 28
#define J2C_RATE 4.19
#define NAME "周杰伦"
#define AGE 21
#define HEIGHT 180.5
#define WEIGHT 56
int main() {
//SetConsoleCP(CP_UTF8);
system("chcp 65001");
//使用符号常量
cout<<FAT_BMI<<endl;
cout<<"焦耳转卡路里的比率是"<<J2C_RATE<<endl;
cout<<"我是"<<NAME<<",今年"<<AGE<<"岁。"<<endl;
cout<<"身高"<<HEIGHT<<"cm,体重"<<WEIGHT<<"KG。"<<endl;
return 0;
}