For/loop statement

This is a discussion on For/loop statement within the C++ Programming forums, part of the General Programming Boards category; What I am trying to do is create a program which will look similar to this:
Enter character: &
&&&&&
...

Am I going along the right path at least? also, this is a somehwat example my professor gave me, am I supposed to be using the i's and j's? what do they mean?

You don't have to use 'i' or 'j' .. you could use 'x' or 'a' or 'HelloMyNameIsFrank' .... they are just names.
In this instance, they're the names of "loop counters" (they keep track of how many times your loop has run - the ++i increments the loop counter every time)

a quick note about the middle expression.. i>=5
You tell the for loop that int i=1; - meaning that the first time the loop runs through, 'i' is equal to 1 ..
Actually, the loop will never run, because you tell it to only run while the middle expression is true: i>=5
(1 is greater than or equal to 5? - Nope!)

also, what is that "ch;" supposed to do after your first "for" statement? at the moment, it's just sitting there creating an error... (Take it out)

By the way, you probably want your endl inside your first 'for' loop. (at the moment, it is dangling after both loops have ended) To do this, you need to use some curly brackets to show what your for loop is... eg,