• c++ count reverse
    5 replies, posted
I am supposed to make a for loop that counts backwards from 5 to 0 seems easy but i just cant seem to get it
Don't create a new thread for every little problem you have, take it to the "What do you need help with?" thread.
would i do something like for(int i = 5, i > 0, i--) { cout << i; } [editline]13th December 2010[/editline] alright sorry
[QUOTE=ttrexler99;26668754]would i do something like for(int i = 5, i > 0, i--) { cout << i; } [/QUOTE] Yes, that's how it's done, except they should be separated by ";". for (int i = 5; i > 0; i--)
[QUOTE=ttrexler99;26668754]would i do something like for(int i = 5, i > 0, i--) { cout << i; } [/QUOTE] Yes. But you probably want to use >= so that it counts the zero, too.
ok Thanks guys
Sorry, you need to Log In to post a reply to this thread.