首页上一页 1 下一页尾页 1 条记录 1/1页
C++从入门到精通第二版问题
发表在C语言图书答疑
2014-01-27
是否精华
是
否
版块置顶:
是
否
您好,咱们光盘里的例子,和我自己编写的程序,只有在工作页面下可以运行完整,当组建成exe文件时,每当运行到最后一步,刚显示出结果,就退出,看不清结果,请问这是怎么回事?以下是我的程序代码:
#include <iostream>
using namespace std;
void main()
{
int iInput;
cout << "Input a value:" << endl;
cin >> iInput; //输入一整型数
if(iInput%2!=0)
cout << "The value is odd number" << endl;
else
cout << "The value is even number" << endl;
}
#include <iostream>
using namespace std;
void main()
{
int iInput;
cout << "Input a value:" << endl;
cin >> iInput; //输入一整型数
if(iInput%2!=0)
cout << "The value is odd number" << endl;
else
cout << "The value is even number" << endl;
}