#include <iostream>
#include <stdlib.h>
using namespace std;
using namespace myNum; //填写命名空间的关键字
{int x = 105;}
int main()
{bool isFlag = false;if(myNum::x % 2 == 0)
{myNum = isFlag;}else{ myNum = !isFlag;}if(myNum == true)
{cout<<"是奇数"<<endl;}else{cout<<"是偶数"<<endl;}return 0;}
#include <stdlib.h>
using namespace std;
using namespace myNum; //填写命名空间的关键字
{int x = 105;}
int main()
{bool isFlag = false;if(myNum::x % 2 == 0)
{myNum = isFlag;}else{ myNum = !isFlag;}if(myNum == true)
{cout<<"是奇数"<<endl;}else{cout<<"是偶数"<<endl;}return 0;}
#include <iostream>
#include <stdlib.h>
using namespace std;
namespace myNum{ int x = 105; }
int main(){
bool isFlag = ture;
if(myNum::x % 2 == 0){
isFlag = false; }
else{
isFlag = ture; }
if(isFlag == 1){
cout <<"变量x是奇数"<<endl;}
else{
cout <<"变量x是偶数"<<endl;}
return 0;
}
#include <stdlib.h>
using namespace std;
namespace myNum{ int x = 105; }
int main(){
bool isFlag = ture;
if(myNum::x % 2 == 0){
isFlag = false; }
else{
isFlag = ture; }
if(isFlag == 1){
cout <<"变量x是奇数"<<endl;}
else{
cout <<"变量x是偶数"<<endl;}
return 0;
}
#include<stdlib.h>
#include<iostream>
namespace myNum
{
int x = 105;
}
using namespace myNum;
using namespace std;
int main()
{
if (x % 2 == 0)
{
cout << "偶数" << endl;
}
else
{
cout << "奇数" << endl;
}
return 0;
}
#include<iostream>
namespace myNum
{
int x = 105;
}
using namespace myNum;
using namespace std;
int main()
{
if (x % 2 == 0)
{
cout << "偶数" << endl;
}
else
{
cout << "奇数" << endl;
}
return 0;
}