cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
do while loop
do while loop
Mar 31, 2017 at 5:32pm UTC
esokoletsky
(32)
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 UTC
gunnerfunner
(2127)
http://coliru.stacked-crooked.com/a/b60f6c6c6a4995e5
Mar 31, 2017 at 5:41pm UTC
keskiverto
(10402)
What is on line 2?
Mar 31, 2017 at 5:46pm UTC
gunnerfunner
(2127)
note OP line 2 and line 5 have different scope
Topic archived. No new replies allowed.