Iteration: for loops

I can seem to figure this question out, can someone please help me out?
Thank you in advance!
Given an int variable n that has already been declared and initialized to a positive value , and another int variable j that has already been declared , use a for loop to print a single line consisting of n asterisks. Thus if n contains 5, five asterisks will be printed. Use no variables other than n and j.
1
2
3
4
5
        for ( int j = 0 ; j < n ; ++j )
	{
		std::cout << "*" ;
	}
Thank you so much!!
Topic archived. No new replies allowed.