We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- C
- Conditionals and Loops
- For Loop in C
- Discussions
For Loop in C
For Loop in C
Sort by
recency
|
867 Discussions
|
Please Login in order to post a comment
include
include
include
include
int main() { int a, b,i; const char *words[] ={"zero","one","two","there","four","five","six","seven","eight","nine","ten"}; scanf("%d\n%d", &a, &b); // Complete the code. for(i=a;i<=b;i++) { if(i>=0 && i<=9){ printf("%s\n",words[i]); } else { printf("%s\n",(i%2==0)?"even":"odd"); } } why hidden task are fielded even all program is right?
}
For Loop in C.
Here is my Solution :
include
include
include
include
int main() { int a, b; scanf("%d\n%d", &a, &b); // Complete the code.
}
Using a for loop in C helps me handle repetitive tasks easily, kind of like following viper plays where every moment matters. Setting the loop correctly makes the process smooth, and it’s satisfying to see each step run exactly as planned. It feels practical and keeps things simple, which makes coding less frustrating.