作者wearebest (巫医 阿贝斯特)
看板C_and_CPP
标题[问题] c++ 2008 express的问题
时间Thu May 7 01:01:03 2009
我想请问一下
为什麽 当我编译完的时候
编译完後的window
它会自己关掉
我想看编译完後 cout出来的值
但是因为会自动关掉
所以只能看到一下下
请问要设定什麽东西
以下是我的程式码
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
using namespace std;
int main()
{
int a[5];
for(int i=0;i<5;i++)
{
printf("第%d个数字:",i+1);
scanf("%d",&a[i]);
}
for(int i=0;i<=4;i++)
{
cout<<"\nfinial a="<<a[i];
}
return 0;
}
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.115.221.148
1F:→ issuemylove:system("pause"); 05/07 01:15
2F:推 AmaiN:执行的时候按ctrl+f5就好 05/07 07:58
3F:推 mathtku:在RETURN 0; 前面加上 system("pause"); 05/07 23:48