/* lab09.cpp CIS 150 6/23/05 David Klick Solution to lab #9. */ #include using std::cout; using std::cin; const int ARRAY_SIZE = 10; int main(void) { int i; double sum, min, max; int n[] = { 3, 6, 2, 1, 7 }; double nums[ARRAY_SIZE]; // display first element of n[] cout << "n[0] = " << n[0] << '\n'; // change n[0] to 13 and redisplay n[0] = 13; cout << "n[0] = " << n[0] << '\n'; // display n[] using a for loop for (i=0; i<5; i++) { cout << n[i] << " "; } cout << '\n'; // get ARRAY_SIZE floats from user to store in nums[] for (i=0; i> nums[i]; } // display nums[] using a for loop cout << "You entered: "; for (i=0; i=0; i--) { cout << nums[i] << " "; } cout << '\n'; // sum up nums[] and print result sum = 0.0; for (i=0; i max) max = nums[i]; } cout << "The maximum value is " << max << '\n'; return 0; }