// Name: McCabe, Micheal
//----above line-----(1)
// Program 1: Using VIM and Make to implement Model B
//----below here-----(2)
// Date: 01/28/2009
// 
#include <iostream>   //includes the input output stream class library
#include <string>     //includes the string class library

using namespace std;  //tells the compiler to assume the standard
                      //namespace is being used
// declare and define the main function (or main program)
int main () 
{
// declare the storage for 11 elements in the array named Box[]
// and initialize each element in order as shown
int Box[10] = {0,3,7,2,1,5,12,4,0,0};
// output a message to the terminal announcing the program name
cout << "Computer Model B Example" << endl;
// perform the calculation steps in the algorithm
Box[9] = 2;
Box[1] = Box[8];
while (Box[9] <= Box[7])
   {
   Box[1] = Box[1] + Box[Box[9]];
   Box[9] = Box[9] + 1;
   }
// output the value computed in Box element 5 to the terminal
cout << Box[1] << endl;
// return control and a completion code to the operating system
return 0;
// end the definition of the main() function
}

