#include <iostream.h>

using namespace std;

int mysum_forLoop(int x[], int len);

int main(){
   //declare your variables for main here.
   const int SIZE = 3;
   int b[SIZE]= {10};
  
    
   cout << endl << "the sum is: " << mysum_forLoop(b, SIZE) << endl;
   
   return 0;
}

//
// This function calculates the sum of numbers in an integer array 
//
// inputs:  
//    x: the integer array to sum
//    len: the number of elements in the array
// outputs:
//    the sum of the integers in array x   
int mysum_forLoop(int x[], int len)
{
   // declare your variables for your function here  
   int sum = 0;

   for (int i = 0; i < len ; i++)
   {
      sum = sum + x[i];
   } // end of for

   return sum;
} // end of: mysum_forLoop

