Question: Using C++, The second picture will help with equations to solve the problem We have a pair of vector in 2D plane. Create a script
We have a pair of vector in 2D plane. Create a script that will compute the area of a triangle that these vectors form. Requirements 1. The user should be prompted 4 times for ai, a2, bi, and b2 For two given vectors A la, a2 I, B la b2 Use individual array for vector A and Vector B Create a user defined function that computes the "Dot Product" between two vectors. (This user defined function should take 4 arguments and return the numerical result of the dot product to the main function.) Create a user defined function that computes the "Magnitude" of individual vector. (This user defined function should take 2 arguments and return the numerical result of the magnitude to the main function.) This function should be used twice SINCE we have two vectors. Compute the angle WITHIN the main function. Create a user defined function that computes the "Area" of the triangle. (This user defined function should take 3 arquments (Magnitudes of each vector and the angle) and return the numerical result of the area to the main function.) 2. 3. 4. 5. 6. Use a pointer to store the Area. 7. Use Dereferencing Pointers to display the result
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
