急急急!!!十万火急!!!!为啥我用f5运行的时候,一直闪退呢??????????????????????????
#include <iostream>
#include <stdlib.h>
using namespace std;
namespace myNum
{
int x = 105;
}
int main()
{
bool num;
if(myNum::x % 2 == 0)
{
bool num = false;
}
else
{
bool num = true;
}
if(num=true)
{
//cout<<"奇数"<<endl;
cout<<"x是奇数"<<endl;
}
else
{
//cout<<"偶数"<<endl;
cout<<"x是偶数"<<endl;
}
return 0;
}