在VS2012中编写的C++程序,运行结果太快而看不出结果的时候,要在return 0;之前加个system("pause");,运行结果如下:
#include <iostream>
using namespace std ;
int main()
{
std ::cout <<"enter two numbers:"<<std ::endl ;
int v1,v2;
std ::cin >>v1 >>v2 ;
std ::cout <<"the number of "<<v1 <<"and"<<v2 <<"is"<<v1 + v2 <<std ::endl ;
system("pause");
return 0;
}
运行结果