3.  請寫出一個程式,他會先嗶一聲,然後打出以下文字

Startled by the sudden sound, Sally shouted, “By the Great Pumpkin, what was that!”

 

程式碼如下

#include "stdafx.h"

#include <stdio.h>                                              //引入stdio.h

#include <stdlib.h>                                             //引入stdlib.h

 

 

int main(int argc, char* argv[])

{

     printf("\aStartled by the sudden sound, Sally shouted,"    //印出字串,用二個雙引號斷成二行

                "\"By the Great Pumpkin, what was that!\"\n");

     system("PAUSE");                                           //「按任意鍵繼續...」的程式,讓程式暫停

     return 0;                                                  //函數結束,傳回整數並跳回原本呼叫的地方

}

創作者介紹

清新下午茶

Johnny 鋼鍊 發表在 痞客邦 PIXNET 留言(0) 人氣()