mirror of
http://106.12.3.193:3000/violeteverisland/learn_cpp.git
synced 2026-03-07 17:17:33 +08:00
1
This commit is contained in:
22
字面常量.cpp
Normal file
22
字面常量.cpp
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user