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

image text in transcribed
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

Database Machine Performance Modeling Methodologies And Evaluation Strategies Lncs 257

Authors: Francesca Cesarini ,Silvio Salza

1st Edition

3540179429, 978-3540179429

More Books

Students also viewed these Databases questions

Question

2. Be specific as to method of meeting all goals.

Answered: 1 week ago

Question

Guidelines for Informative Speeches?

Answered: 1 week ago