上一頁: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




 


















其它文章

arrow
arrow
    文章標籤
    c Dev-C++
    全站熱搜

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