上一頁:Dev-C++ 測試及執行(三)

方法1
加入  getchar();

程式:
#include <stdio.h>
int main(void)
{
    printf("Hello!\n");
    getchar();
    return 0;
}

圖1




方法2

加入  system("pause");
使用 system 必需#include <stdlib.h>

程式
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
    printf("Hello!\n");
    system("pause");
    return 0;
}

圖2




 


















其它文章

文章標籤
全站熱搜
創作者介紹
創作者 PG Levin Li 的頭像
PG Levin Li

程式開發學習之路

PG Levin Li 發表在 痞客邦 留言(0) 人氣(1,511)