chap 4 notes 48 - <<maxNum; return ; } A do-while...

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

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

Unformatted text preview: <<maxNum; return ; } A do-while Example num maxNum 2 2 This is the first point at which the condition is checked. Since num is not zero, the loop continues to execute....
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