// WHO: Micheal H. McCabe
// WHAT: Model B2
// When: February 4, 2009

#include <iostream>
#include <string>
using namespace std;
int main ()
{
int Box[10]  = {0,3,7,2,1,5,12,4,0,0};

// declare two whole numbers variables named "input1" and "input2"
// and initialize them to zero.
//<---------------------

int input1 = 0;
int input2 = 0;

cout << "Computer Model B2 " << endl;

// Compose a while loop that continues as long as input1 is greater
// than or equal to 0; the scope of the statements is to the last cout
// statement below

while ( input1 >= 0)
	{

	// Prompt the user with: "Enter a small integer between 1 and 10:"
	
	cout << "Enter a small integer between 1 and 10: ";

	// Get a numeric input from standard input and store it in input1
	
	cin >> input1;

	// Prompt the user with a newline and then the prompt.

	cout << endl;

	// "Enter a bigger small integer between 5 and 20:"
	
	cout << "Enter a bigger small integer between 5 and 20: ";

	// Get a numeric input from standard input and store it in input2
	
	cin >> input2;

        Box[9] = input1;
        Box[7] = input2;
        Box[1] = Box[8];

        while ( Box[9] <= Box[7] )
                   {
                   Box[1] = Box[1] + Box[Box[9]];
                   cout << "Box[1] " << Box[1]<< endl;
		   Box[9] = Box[9] +1;
                  };
        cout << "Value in Box[1] = " << Box[1] << endl;
	}

return 0;
}

