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
5.11.5: Functions with vector parameters.
5437022999808 q 339y7
Jump to level 1
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:
4,
-5,4.0,8.0,6.0
then the vector has 4 elements {-5.0,4.0,8.0,6.0} and the output is:
25.00
16.00
64.00
36.00
Note: The square of x is x***x.
#include ;++i
 CHALLENGE ACTIVITY 5.11.5: Functions with vector parameters. 5437022999808 q 339y7 Jump

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!