11-QualityProgrammingWithArrays

11-QualityProgrammingWithArrays - qualityprogramming...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
quality programming now with Arrays
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Reading Chapter 7 covers Functions Chapter 4, pgs 144-172 covers Pointers Remedial Help: Friday, at 11 and 2, we can meet here to go over Labs 5 and 6.
Background image of page 2
Lab scores kept in Array #include <iostream> using namespace std; int presentMenu( ); const in arraySize = 3; double getLowest( double score[ arraySize ] ); double lab[ arraySize] = {-1, -1, -1}; void main ( ) {
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
int presentMenu( ); uses a function to put up the menu it will require NO information to function (parenthesis are empty) it will return an integer
Background image of page 4
the actual presentMenu function int presentMenu( ) { int selection = -1; cout << "*************" << endl; cout << "1. Enter Lab Score: "; for( int y=0; y<arraySize; y++) { cout << " " << lab[ y ] ; } cout << endl; cout << "2. Get Lowest Lab Grade" << endl; cout << “3. Calculate Average" << endl; cout << “4. Quit" << endl << endl; cout << "Enter choice, 1-4: "; cin >> selection; cout << endl; return selection; }
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 12

11-QualityProgrammingWithArrays - qualityprogramming...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online