#include #include using namespace std; //Arrays //Initialize given array to give value //at positions start up to and including index end. void initializeArrayTo(double myArray[], int start, int end, double value) { for (int i = start; i <= end; i++) { myArray[i] = value; } } //Quiz: add up all values in array A from start to end, //return the total sum. double sum(double A[], int start, int end) { } int main() { //declare 10 doubles all at once: //use an array double numbers[10]; //Let's get rid of those garbage values... //Initialize values of array to all -99 initializeArrayTo(numbers, 0, 9, -99.99); numbers[3] = 3.14; numbers[5] = 17.8; numbers[9] = 86.3; //let's look at all of them for (int i = 0; i < 10; i++) { cout << "item at array index " << i << " is: " << numbers[i] << endl; } //quiz: cout << sum(numbers, 0, 9) << endl; //?? return 0; }