#include<iostream>
using namespace std;
class generate
{
int num;
public:
void getdata();
void check();
};
void generate::getdata()
{
cout<<"Enter the number:"<<endl;
cin>>num;
}
void generate::check()
{
int n;
cout<<"Even"<<endl;
for(int i=1;i<=2*n;i++)
{
if(i%2==0)
cout<<i<<" "<<endl;
}
cout<<"Odd"<<endl;
for(int i=1;i<=2*n;i++)
{
if(i%2!=0)
cout<<i<<" "<<endl;
}
}
int main()
{
generate x;
x.getdata();
x.check();
return 0;
}
To embed this project on your website, copy the following code and paste it into your website's HTML: