// sumLoopEOFArray.cc  P.Conrad for CISC181 Spring 2007
// Read integers from stdin, one per line, ending with EOF (end of file)
// Output the sum (with no special labels---just a bare number)

#include <iostream>
using namespace std;


int main()
{
  
  // initialize sum and declare variable to hold the input

  int thisNum;

  const int MAXSIZE = 100;
  int nums[MAXSIZE]; // an array that can store up to 100 nums
  int count = 0;


  // read all data into my array
  
  cin >> thisNum;
  while ( !cin.eof() ) // eof() is a "member function" for the object cin
    {

      nums[count] = thisNum;
      count ++; // increment AFTERWARDS... why?  @@@ We'll say on thursday...
      cin >> thisNum; // read the next number
    }
  
  // @@@ Write a function to calculate the sum of the array
  // @@@ Point out that for sum, min, max, an array is not needed.

  return 0;
}




