次方用法
xxx = xxx *(pow(數字 , 幾次方)) ;
area = PI * float(pow(radious , 2)) ;
count用法
const 資料型態 常數符號 = 數值
const float abc =5
#define用法
#define 對等符號 對等資料/
#define PI 3.14159f
字元用法
char letter = 'c' ;
char str1[3] = { 'c' , '+' , '+' }
char str2[4] = "c++"
char str3{}= "c++++++++++++++"
sizeof用法
sizef(資料型態 變數名稱)
cin用法
cin >> 變數
setw用法
cout << setw(12) ;
setprecision用法
cout << setprecision(2)
setiosflags(ios::格式符號)用法
cout.width()用法
cout.wtdth(5)
cin.width(欄位寬度)用法
cin.width(8)
cin.getline(變數,長度,'/n')
cin.getline(char,8)
cin.get(字元變數)
cin.get(char)
cin.ignore(長度)
cin.ignore(8)
指定型態(資料 變數)
n = int(n1 + 1)
單一指定
資料型態 變數名稱
變數名稱 = 初值
int n ;
n = 5 ;
產生固定亂數用法
#include <cstdlib>
int rand()
產生種子數用法
#include <cstdlib>
void(數字)
void(5)