Holey_yan

20140218_KUAS_VisualC++_PrintHelloWorld

Feb 18th, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.91 KB | None | 0 0
  1. /************************************/
  2. /** 20140218 Print Hello World     **/
  3. /** Maker  : Yan                   **/
  4. /** E-Mail : [email protected] **/
  5. /** Date   : 2014/02/18 am.11:00   **/
  6. /************************************/
  7.  
  8. //include = 引入標頭檔, 標頭檔是包含某些函式(function) 內容的函式庫(library) 檔案
  9. #include <stdio.h> //標準輸入與輸出
  10. #include <stdlib.h> //標準函式庫, 提供各類基本函式
  11.  
  12. //C 語言一進入程式執行後, 會先尋找main() 並開始逐行執行, 當結束時代表程式結束
  13. //可將main 視為整體程式
  14. void main(){//每段區塊務必用{} 大括號框住, 如if.. then..、for.. next.. 等
  15.    
  16.     printf("Hello World\n");
  17.     //printf (顯示字串, 若是指定則用雙引號("") 框住, 類似VB)
  18.     //"\n" 為斷行符號
  19.     //另外每一程式碼敘述結尾處必須加上分號(;) 來區隔
  20.  
  21.     system("pause"); // 暫停指令
  22. }
Advertisement
Add Comment
Please, Sign In to add comment