do while loop

Mar 31, 2017 at 5:32pm
Given an int variable k that has already been declared , use a do...while loop to print a single line consisting of 97 asterisks. Use no variables other than k.
What am I doing wrong?
1
2
3
4
5
6
7
  do{
for(k=1;k<=97;k++)
cout<<"*";
    }
while(k<=97)
	
Mar 31, 2017 at 5:41pm
Mar 31, 2017 at 5:41pm
What is on line 2?
Mar 31, 2017 at 5:46pm
note OP line 2 and line 5 have different scope
Topic archived. No new replies allowed.