Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Define an alles for this dota type named vector (using typeder) receives three double numbers and vector structure inisalined with the volues passed to data

Define an alles for this dota type named vector (using typeder) receives three double numbers and vector structure inisalined with the volues passed to data member the function where the first pasemeter is the velue for datemember x nemed InvVect that takes a vector structure and neturns the inverse of the vector (negative value of each data Create & function member x Create a function named normVect tnat takes a vector structure and returns the Euclideen nom of the vector defined es . Create a tunection nemed addVect that takes two vector structures and neturns a vector structure with the sum of both vectors passed Create a function named distvect that takes two vector structures and setuns the Euclideen distance between the two vectors de ned as Create e function named prodVect that takes two vector structures and setuns the scaler product of both vectors defined as Ceste#tuncton named proped that takes two vector structures endreturnsthe scalar priection of thefrst vector orto the second vector defined below, If he norm of v2 is zeno then reurn 0 . 1-2 proj- Create a function named anglevect that takes two vector structures and returns the ange in degrees between the two vectors eed belo For computing the cosine inverse use the funetion acos Use Pt-314159265 ifthe nom of any of the tao vectors is zero then retum Tasks (Read Carefuty) Create a program that reeds two vectors from the user as folows 10-4 7-4, 3.0) (2.4, 2.4,1.3) Then have your program output the tolawing (add n oher every line) : (30-40 7-40 3-00) v2: 1.40 2.40, 1.30 2wir (32-00 9-804.30 v2-v: -9.00-5.00 -2-70 nornvi)1 23.11 prod (vi,21 36-22

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

App Inventor

Authors: David Wolber, Hal Abelson

1st Edition

1449397484, 9781449397487

More Books

Students also viewed these Programming questions

Question

Implement the method contains() for BST.

Answered: 1 week ago

Question

Find the steady-state vector. .1 .9 .6 .4

Answered: 1 week ago