//
//  This loop adds the first n elements of the array data.
//
    sum = 0;
    for ( i = 0; i < n; i++ ) {
        sum = sum + data[i];
    }