Question: CHALLENGE ACTIVITY 5 . 1 1 . 5 : Functions with vector parameters. 5 4 3 7 0 2 2 9 9 9 8 0
CHALLENGE
ACTIVITY
: Functions with vector parameters.
q
Jump to level
Define a function SquareVector that takes an input double vector parameter and an output vector parameter passed by reference. The function stores the square of each input vector element to the output vector.
Ex: If the input is:
then the vector has elements and the output is:
Note: The square of is
#include ;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
