You are viewing a single comment's thread. Return to all comments →
#include<stdio.h> int main() { int a, b; char word[10][10] = {"zero","one","two","three","four","five","six","seven","eight","nine"}; scanf("%d", &a); scanf("%d", &b); for(int n=a;n<=b;n++) { if(n>=0 && n<=9) printf("%s\n",word[n]); else if(n % 2 == 0) printf("even\n"); else printf("odd\n"); } return 0; }
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 →