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