You are viewing a single comment's thread. Return to all comments →
That simple version and u dont need to handling every case. If u have any qs I'am Here.
#include <stdio.h> int main(void) { int a, b; scanf("%d\n%d", &a ,&b); const char *nbword[10] = {"zero", "one", "two", "three", "four" ,"five", "six", "seven" ,"eight", "nine"}; int i = a; while (i <= b) { if (i >= 1 && i <= 9) printf("%s\n", nbword[i]); else { if (!(i % 2 == 0)) printf("odd\n"); else printf("even\n"); } i++; }
}
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 →
That simple version and u dont need to handling every case. If u have any qs I'am Here.
}