Hi there
Ive just started with c and i cant get my for loop to run more than once.
Any help greatly appreciated!!!
thanks againCode:int main() { int i; for (i = 1; i 11; i++) { printf("blah\n"); } return EXIT_SUCCESS }
Hi there
Ive just started with c and i cant get my for loop to run more than once.
Any help greatly appreciated!!!
thanks againCode:int main() { int i; for (i = 1; i 11; i++) { printf("blah\n"); } return EXIT_SUCCESS }
sorry im truly not that simple (well who knows!!)
my problem was that i had a ';' at the end of my for statement!!
i did actually have the '<' in my code.
but thanks for your replyCode:int i; for(i=1; i<11; i++); <-- { printf("blah\n"); } return 0;
>my problem was that i had a ';' at the end of my for statement!!
Then please post the code exactly as you're trying to compile it. Your first post omits the relational operator and there is no semicolon after the loop; this makes finding your exact problem virtually impossible.
-Prelude
My best code is written with the delete key.