INSTRUCTIONS:Given an int variable k that has already been declared, use a while loop to print a single line consisting of 97 asterisks. Use no variables other than k .
Here is what I put in:
1 2 3 4 5
while (k <= 97)
{
cout << "*";
k++;
}
Here is the error I keep getting:
Remarks:
⇒ When executed, your code tried to create an excessively
large file. A common cause for this is an infinite loop.
Carefully check the condition and the loop body of any loop
that does output.
I understand that the code I put in is doing this:
1 2 3 4
*
*
*
*
(97 times).
But how do I make the while loop do this, I need it on a single line;
Apparently it wanted me to declare 0 when it told me it had already been declared. Lol I feel like I am answering philosophy questions the wording is so misleading...