返回列表 發帖

我的第一支程式

本帖最後由 tonyh 於 2015-1-30 10:30 編輯

在螢幕上顯示 hello 字樣.
  1. #include<iostream>  //引入標頭檔 <基本輸入輸出>  in & out 串流  
  2. #include<cstdlib>   //引入標頭檔 <基本函式庫>  c standard library
  3. using namespace std;  //使用命名空間 std
  4. int main()   //主函式開始
  5. {            //主函式的內容
  6.     cout<<"hello"<<endl;   //利用cout進行輸出, endl代表換行
  7.     system("pause");   //暫停
  8.     return 0;          //回傳0到主控台告訴電腦本程式已成功執行
  9. }
複製代碼

返回列表