Toggle navigation
Home
Latest pastes
FAQ
Random
BitBin is shutting down!
Register
Login
C++ While Loop example
SUBMITTED BY:
Guest
DATE:
Oct. 12, 2013, 10 p.m.
FORMAT:
C++
SIZE:
296 Bytes
Raw
Download
Tweet
HITS:
1127
Go to comments
Report
#include
<iostream>
using
std
::
cout
;
int
main
()
{
int
a
=
0
;
while
(
a
!=
11
)
//While a does not equal 11
{
a
++
;
//add 1 to a
cout
<<
a
<<
"
\n
"
;
//print a and add newline
}
cout
<<
"The loop has ended"
;
return
0
;
}
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus