Skip to content

Instantly share code, notes, and snippets.

@Abhayparashar31
Created July 12, 2020 04:17
Show Gist options
  • Save Abhayparashar31/d8173bf5949a8e827eef227642222946 to your computer and use it in GitHub Desktop.
Save Abhayparashar31/d8173bf5949a8e827eef227642222946 to your computer and use it in GitHub Desktop.
#include <iostream>
using namespace std;
int main() {
// Complete the code.
int n,n2,i;
cin>>n>>n2;
for(i=n;i<=n2;i++)
{
if(i==1)
{
printf("one\n");
}
else if(i==2)
{
printf("two\n");
}
else if(i==3)
{
printf("three\n");
}
else if(i==4)
{
printf("four\n");
}
else if(i==5)
{
printf("five\n");
}
else if(i==6)
{
printf("six\n");
}
else if(i==7)
{
printf("seven\n");
}
else if(i==8)
{
printf("eight\n");
}
else if(i==9)
{
printf("nine\n");
}
else if(i>9)
{
if(i%2==0)
{
printf("even\n");
}
else{
printf("odd\n");
}
}
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment