• + 0 comments
    using namespace std;
    int main() {
            int a,b;
            cout<<"Enter the range of numbers: "<<endl;
            cin>>a>>b;
            for(int i=a;i<=b;i++)
            {
                if(i<=9)
                {
                    switch(i)
                    {
                        case 1:
                            cout<<"one"<<endl;
                        case 2:
                            cout<<"two"<<endl;
                        case 3:
                            cout<<"three"<<endl;
                        case 4:
                            cout<<"four"<<endl;
                        case 5:
                            cout<<"five"<<endl;
                        case 6:
                            cout<<"six"<<endl;
                        case 7:
                            cout<<"seven"<<endl;
                        case 8:
                            cout<<"eight"<<endl;
                        case 9:
                            cout<<"nine"<<endl;
                            break;
                    }
                }
                else if(i%2==0)
                {
                    cout<<"even"<<endl;
                }
                else if(i%2!=0)
                {
                    cout<<"odd"<<endl;
                }
                else
                {
                    cout<<"Error in entry!!"<<endl;
                }
    
            }
    				return0;
    }