主题:控制台程序运行问题
#include "stdafx.h"
#include <iostream>
int _tmain(int argc, _TCHAR* argv[])
{
using namespace std;
int x = 3, y = 6, z = 10;
cout << "3 * 6 is " << x * y << endl
<< "6 / 3 is " << y / x << endl
<< "10 % 3 is " << z % x << endl
<< "10 / 3 is " << (float) z / x << endl;
return 0;
}
编译没错,运行就是看不到界面。一闪就没了。。。
#include <iostream>
int _tmain(int argc, _TCHAR* argv[])
{
using namespace std;
int x = 3, y = 6, z = 10;
cout << "3 * 6 is " << x * y << endl
<< "6 / 3 is " << y / x << endl
<< "10 % 3 is " << z % x << endl
<< "10 / 3 is " << (float) z / x << endl;
return 0;
}
编译没错,运行就是看不到界面。一闪就没了。。。