- #include<iostream> //引入 <基本輸入輸出> 標頭檔 input & output stream
- #include<cstdlib> //引入 <標準函式庫> 標頭檔 c standard library
- using namespace std; //指定命名空間為 std
- int main() //主函式
- {
-
- string name ="尤爾帆";
- string school= "瑞興國小";
- int age =9;
- float h= 142;
- float w=32.3;
- cout<<"我的大名:"<<name<<endl;
- cout<<"就讀:"<<school<<endl;
- cout<<"今年:"<<age<<"歲"<<endl;
- cout<<"身高:"<<h<<"cm"<<endl;
- cout<<"體重:"<<w<<"kg"<<endl;
-
- system("pause"); //讓畫面暫停
- return 0; //回傳0到主控台,告知該程式已成功執行
- }
複製代碼 |