You are viewing a single comment's thread. Return to all comments →
char chr[9][6]={"one","two","three","four","five","six","seven","eight","nine"}; for(int i=a;i<=b;i++) { if(i<10){ printf("%s\n",chr[i-1]); } else{ if(i%2==0){ printf("even\n"); } else{ printf("odd\n"); } }
}
Seems like cookies are disabled on this browser, please enable them to open this website
For Loop in C
You are viewing a single comment's thread. Return to all comments →
char chr[9][6]={"one","two","three","four","five","six","seven","eight","nine"}; for(int i=a;i<=b;i++) { if(i<10){ printf("%s\n",chr[i-1]); } else{ if(i%2==0){ printf("even\n"); } else{ printf("odd\n"); } }