Write a c function here is the function you should


Write a C++ function: Here is the function you should implement:

// // // vector local_average(vector w, int loc) { } // // Find the average length of the strings in the vector *w* // over an averaging interval of *loc*, with the averaging "window" // shifting by one each time.

// // That is, we take the average length of *w* for the first *loc* // strings, then the strings from 1 to *loc*, // then the strings from 2 to *loc*+1, // The last value in the returned vector *w* // will be the average length of the last *loc* strings in *w* // Example results: // // w loc output // abc abd a b c 1 3 3 1 1 1 // a z w aaa 123 2 1 1 2 3 // abc abc a b c 3 2.33 1.67 1 // abc a b c abd 4 1.5 1.5 // a bcd e 2 2 2 // a b abcedae w x z 3 3 3 3 1 // a 22 333 1 2 1.5 2.5 2

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Write a c function here is the function you should
Reference No:- TGS01522166

Now Priced at $10 (50% Discount)

Recommended (94%)

Rated (4.6/5)