Ignore:
Timestamp:
Dec 21, 2025, 1:35:46 PM (5 weeks ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
master
Children:
4904b05
Parents:
eb0d9b7
Message:

last proofread array chapter

File:
1 edited

Legend:

Unmodified
Added
Removed
  • doc/theses/mike_brooks_MMath/programs/ar-bchk/control.cc

    reb0d9b7 r80e83b6c  
    2222        vector<float> & x ) {
    2323        double sum = 0;
    24         for( size_t i = 0;
     24        for ( size_t i = 0;
    2525            i < BND( x.size() ); i++ )
    26         sum += x.at(i);
     26        sum += @x.at(i)@;
    2727        return sum;
    2828}
     
    4343int main() {
    4444        vector<float> x( EXPSZ );
    45         for( size_t i = 0; i < EXPSZ; i++ ) x.at(i) = 0.1 * (i + 1);
    46         for( size_t i = 0; i < EXPSZ; i++ ) cout << "elm " << i << " " <<  x[i] << endl;
     45        for ( size_t i = 0; i < EXPSZ; i++ ) x.at(i) = 0.1 * (i + 1);
     46        for ( size_t i = 0; i < EXPSZ; i++ ) cout << "elm " << i << " " <<  x[i] << endl;
    4747        double sum_ret = sum( x );
    4848        cout << "sum   " << sum_ret << endl;
Note: See TracChangeset for help on using the changeset viewer.