Write a function maxv that returns the largest element of a


Question: Write a function maxv() that returns the largest element of a vector argument. Also write a main which reads positive integers from the keyboard (until a (-1) is entered), stores them in a vector, calls maxv() to determine the largest element, and prints out the index and value in the subsequent format:

"maximum value was v[" index "] = " value "

Find the largest element and print out the index and value.

Request for Solution File

Ask an Expert for Answer!!
C/C++ Programming: Write a function maxv that returns the largest element of a
Reference No:- TGS0955505

Expected delivery within 24 Hours