Loading...

變數


變數

// 整數
short my_short;
int my_int;
long my_long;
long long my_long_long;

// 字元
char my_char;

// 浮點數
float my_float;
double my_double;

// 布林
bool my_bool;



輸入 / 輸出


輸入 / 輸出

// cin / cout
int x;
cin >> x; // 輸入
cout << x; // 輸出

// scanf / printf
int y;
scanf("%d", &y); // 輸入(注意取址符'&')
printf("%d", y); // 輸出

基礎

算法