int main()
{
bool isFlag = false;
if(myNum::x % 2 == 0)
{
isFlag = false;
}
else
{
isFlag = true;
}
if(isFlag)
{
cout << "变量" << myNum::x << "是奇数" << endl;
}
else
{
cout << "变量" << myNum::x << "是偶数" << endl;
}
return 0;
}
{
bool isFlag = false;
if(myNum::x % 2 == 0)
{
isFlag = false;
}
else
{
isFlag = true;
}
if(isFlag)
{
cout << "变量" << myNum::x << "是奇数" << endl;
}
else
{
cout << "变量" << myNum::x << "是偶数" << endl;
}
return 0;
}
#include <iostream>
#include <stdlib.h>
using namespace std;
namespace myNum
{int x = 105;}
int main()
{
using namespace myNum;
bool isFlag = false;
if(myNum::x % 2 == 0)
{isFlag = false ;}else{isFlag = true ;}
if(isFlag)
{cout << x << "是奇数";}else{cout << x << "是偶数";}
return 0;
}
#include <stdlib.h>
using namespace std;
namespace myNum
{int x = 105;}
int main()
{
using namespace myNum;
bool isFlag = false;
if(myNum::x % 2 == 0)
{isFlag = false ;}else{isFlag = true ;}
if(isFlag)
{cout << x << "是奇数";}else{cout << x << "是偶数";}
return 0;
}
#include <iostream>
#include <stdlib.h>
using namespace std;
namespace myNum
{
int x = 105;
}
int main()
{ bool isFlag = false;
if(myNum::x % 2 == 0)
{
isFlag=false;
}
else{isFlag=true;}
if(isFlag=true)
{cout<<"变量x是奇数"<<endl;}
else{cout<<"变量x是偶数"<<endl;}
return 0;
}
#include <stdlib.h>
using namespace std;
namespace myNum
{
int x = 105;
}
int main()
{ bool isFlag = false;
if(myNum::x % 2 == 0)
{
isFlag=false;
}
else{isFlag=true;}
if(isFlag=true)
{cout<<"变量x是奇数"<<endl;}
else{cout<<"变量x是偶数"<<endl;}
return 0;
}