chap 4 notes 46 - cout<< endl...

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

View Full Document Right Arrow Icon
46 A do-while Example #include <iostream> using namespace std; int main( void ) { int num, maxNum= 0 ; do { cout<< "Enter a number (0 to quit): " ; cin>>num;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cout&lt;&lt; endl &lt;&lt; endl; if (num&gt;maxNum) maxNum=num; } while (num!= ); cout&lt;&lt; MAX NUMBER = &quot; &lt;&lt;maxNum; return ; } num maxNum 2 0...
View Full Document

Ask a homework question - tutors are online