Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Using C++,
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 The second picture will help with equations to solve the problem
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started