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