#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;}system("pause");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;}system("pause");return 0;
}
int main()
{
bool isFlag = false;
if(myNum::x % 2 == 0)
{
bool isFlag = false;
}
else
{
bool isFlag = true;}
if(myNum::x % 2 == 1)
{
cout << "X 是 奇数" << y << endl;
cin >> y;
}
else
{cout << "X 是 偶数" << y << endl;
cin >> y;
{
bool isFlag = false;
if(myNum::x % 2 == 0)
{
bool isFlag = false;
}
else
{
bool isFlag = true;}
if(myNum::x % 2 == 1)
{
cout << "X 是 奇数" << y << endl;
cin >> y;
}
else
{cout << "X 是 偶数" << y << endl;
cin >> y;
#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){
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){
cout << x <<"是奇数"<<endl;
}
else{
cout<<x<<"是偶数"<<endl;
}
return 0;
}