Question: Write a function called read _ vector which inputs from the user a 2 D vector by reading its x - and y - coordinates.
Write a function called readvector which inputs from the user a D vector by reading its x and y coordinates. If the user enters zero for BOTH coordinates then repeatedly display the message "Coordinates cannot both be zero." and reprompt the user. Use the global constant EPSILON to compare these values to zero. Define the function so that it does not return a value and has three input parameters:
Type string that holds the prompt displayed to the user. Define the string as a const parameter and use passbyreference. See the lecture notes on how to do this.
Type double that holds the first coordinate of the D vector. Define this parameter as passbyreference.
Type double that holds the second coordinate of the D vector. Define this parameter as passbyreference.
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
