chap 4 notes 41 - ) { int num= , sum= ; while...

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

View Full Document Right Arrow Icon
41 Another while Example num sum 6 21 Here the condition is now false, so the loop stops. #include <iostream> using namespace std; int main( void
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: ) { int num= , sum= ; while (sum&lt;= 20 ){ cout&lt;&lt; &quot;SUM= &quot; &lt;&lt; sum&lt;&lt; &quot;NUM= &quot; &lt;&lt; num&lt;&lt;endl&lt;&lt;endl; num++; sum+=num; } return ; }...
View Full Document

This note was uploaded on 11/16/2011 for the course COP 2271 taught by Professor Staff during the Fall '11 term at University of Florida.

Ask a homework question - tutors are online