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

Step: 3

blur-text-image

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

Visual C# And Databases

Authors: Philip Conrod, Lou Tylee

16th Edition

1951077083, 978-1951077082

More Books

Students also viewed these Databases questions