{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

chap 4 notes 63 - 20 return num sum 6 21 Condition is...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
63 Another do-while Example #include <iostream> using namespace std; int main( void ) { int num= 0 , sum= 0 ; do { num++; cout<< "SUM= " << sum << endl << endl; sum+=num; } while (sum<=
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 20 ) return ; } num sum 6 21 Condition is checked again. At this point, sum is greater than 20, so the condition is false, and the loop stops....
View Full Document

{[ snackBarMessage ]}