You are viewing a single comment's thread. Return to all comments →
this answer is right according to editorial output but getting test fai
int main() { int a, b, i; scanf ("%d %d", &a, &b); for (i = a; i <= b; i++) { if (i==8) { printf("eight \n"); } if(i==9) { printf("nine \n"); } if (i==10) { printf("ten \n"); } if (i==11) { printf("eleven \n"); } } for (i = a; i <= b; i++) { if (i%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 →
this answer is right according to editorial output but getting test fai
include
include
include
include
int main() { int a, b, i; scanf ("%d %d", &a, &b); for (i = a; i <= b; i++) { if (i==8) { printf("eight \n"); } if(i==9) { printf("nine \n"); } if (i==10) { printf("ten \n"); } if (i==11) { printf("eleven \n"); } } for (i = a; i <= b; i++) { if (i%2==0) { printf("even \n"); } else { printf("odd \n"); } } return 0; }