Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 read_vector which inputs from the user a 2D 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 re-prompt 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 pass-by-reference. See the lecture notes on how to do this.
Type double that holds the first coordinate of the 2D vector. Define this parameter as pass-by-reference.
Type double that holds the second coordinate of the 2D vector. Define this parameter as pass-by-reference.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Horse Betting The Road To Absolute Horse Racing 2

Authors: NAKAGAWA,YUKIO

1st Edition

B0CFZN219G, 979-8856410593

More Books

Students also viewed these Databases questions

Question

Explain the various techniques of Management Development.

Answered: 1 week ago

Question

4. How does eff ective listening diff er across listening goals?

Answered: 1 week ago