Question: Please write C++ code for this problem Write a structure Vector, note: this is not the C++ class vector element, which encodes the structure of

Please write C++ code for this problem
Write a structure Vector, note: this is not the C++ class vector element, which encodes the structure of a 3D vector as x - the x coordinate of the Vector as a double y - the y coordinate of the Vector as a double 2 - the z coordinate of the Vector as a double Write the functions as they appear in the main function, along with the appropriate input argument parameters. Do not change the names of the functions or the types of the arguments. You may write additional helper functions (if you want) and call them inside the functions listed in the main function, but they may not be called inside the main function on their own. The definitions of functions occurring in the main function must be written above the main function. You main function MUST look like this - you will need to add some code for proper display to screen: int main() { Vector v1; Vector v2; /*this is how we generate Vectors */ v1 = generate vector (2,1,3); // [5 Points) for correct generate_vector() function v2 = generate_vector(4,-5,8); /*output format of a Vector*/ // [5 Points] for correct show() function cout cout /* these function RETURN values and with COUT we print their results to screen. note: these calls are not complete. add the appropriate code/type declaration to produce proper results. in summary, make it work, without changing names of functions */ cout
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
