Programming Languages
Saturday, April 28, 2012
9.20
Show how to imitate a while-statement in C/C++ with a do-statement.
int dowhile = 5;
do
{
if (dowhile > 0 == true)
{
cout << dowhile << endl;
dowhile--;
}
else break;
}
while(true);
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment