史萊姆論壇

史萊姆論壇 (http://forum.slime.com.tw/)
-   程式語言討論區 (http://forum.slime.com.tw/f76.html)
-   -   Dev C++如何停住畫面 (http://forum.slime.com.tw/thread218196.html)

猜謎人 2007-10-14 05:02 PM

Dev C++如何停住畫面
 
我的程式如下
語法:

#include<stdio.h>
int main()
{
    int x;
x=10;
printf("x=%d\n", x);
x=x+3;
printf("x=%d\n", x);
return (0);
}

可是編譯結果一眨眼就看不到
程式我要怎麼寫才可停住結果?

fundu5650 2007-10-14 08:31 PM

#include<stdio.h>
int main()
{
int x;
x=10;
printf("x=%d\n", x);
x=x+3;
printf("x=%d\n", x);
system("PAUSE");
return (0);
}

猜謎人 2007-10-14 08:40 PM

引用:

作者: fundu5650 (文章 1826194)
#include<stdio.h>
int main()
{
int x;
x=10;
printf("x=%d\n", x);
x=x+3;
printf("x=%d\n", x);
system("PAUSE");
return (0);
}

不行耶
我照大大的方法
反而不行

leowang 2007-10-14 08:50 PM

#include<stdio.h>
#include <stdlib.h>
int main()
{
int x;
x=10;
printf("x=%d\n", x);
x=x+3;
printf("x=%d\n", x);
system("PAUSE"); //執行這個函數 要先宣告#include <stdlib.h>才能動
return 0;
}

猜謎人 2007-10-14 09:15 PM

引用:

作者: leowang (文章 1826201)
#include<stdio.h>
#include <stdlib.h>
int main()
{
int x;
x=10;
printf("x=%d\n", x);
x=x+3;
printf("x=%d\n", x);
system("PAUSE"); //執行這個函數 要先宣告#include <stdlib.h>才能動
return 0;
}

成功了!
感謝教導
又學到一招:on_12::on_12:


所有時間均為台北時間。現在的時間是 04:22 PM

Powered by vBulletin® 版本 3.6.8
版權所有 ©2000 - 2024, Jelsoft Enterprises Ltd.

『服務條款』

* 有問題不知道該怎麼解決嗎?請聯絡本站的系統管理員 *


SEO by vBSEO 3.6.1