[TUT] For LOOP

Well I know that some people have trouble with the 'FOR LOOP' so I am here to Explain.

int count;
for(count=1; count<=100; count=count + 1)
cout << count << " ";

Now, I will just explain briefly.

count = 1. If it's lower then 100 keep going up by 1 till it's 100 then stop.

now you will rarely see it written in C++ by professionals.

You would normally see that count=count + 1 as count++ same thing and for a decrease it would be count--.

Hope I helped.

Thanks,
Cody.
Doesn't the tutorial on this site cover this pretty well?
http://www.cplusplus.com/doc/tutorial/control/#for
To much, I did it the simplest way to Understand. I did not ask for nobody's Opinion no what they think is better.

Thanks for trying my fine sir.
Have a good day :)
How can this be called a tutorial when it doesn't even explain what each part of the statement does?

Also, your loop sucks.
I agree the tutorial on the site is much better due to the fact he does not even cover the for command entirely. I mean what if we start seeing for loops with brackets? What does the "break;" statement do? All we are saying ZueS is, if you want to write it better just cover a little bit more about all the statements in the command and the possibilities for it. One more reminder since you are new use the forum [code] tags.
100??? I thought those things could only count up to FOR.

Thanks ZueS, I've seen the light!

;^)
I wish there was a community delete button for posts like this...
Return 0+1
Let's have a button where, if several people vote to delete a post, we can just kill it off to obstruct crap like this.
And
I did not ask for nobody's Opinion no what they think is better.

Then keep muttering to yourself and don't post on a forum; this is a COMMUNITY and the point is that we comment on other people/their programs/their wannabe tutorials.
Frankly, this website's tutorial completely kicks this thing's ass.
Topic archived. No new replies allowed.