- #include<iostream> //input & output
- #include<cstdlib> //standard liburary
- using namespace std;
- int main() //主函式
- {
- string name="李大全";
- string school="陽明國小";
- int age=12;
- float height=133.6;
- float weight=30.5;
- cout<<"我的大名: "<<name<<endl;
- cout<<"就讀: "<<school<<endl;
- cout<<"今年: "<<age<<" 歲"<<endl;
- cout<<"身高: "<<height<<" 公分"<<endl;
- cout<<"體重: "<<weight<<" 公斤"<<endl;
- system("pause");
- return 0; //回傳0 告訴電腦本程式已成功結束
- }
複製代碼 |