Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The deadline of submission is February 15th. Acceptable file format for submission is C source file, not a text file, archive file, word document or

image text in transcribed
The deadline of submission is February 15th. Acceptable file format for submission is C source file, not a text file, archive file, word document or executable file. Check your program carefully before submission. Test data differs from the sample input will be used in the grading. Make sure your program work properly for all possible eases. You just need to fill the content of hw2.c, do not change the form of the function. It is fine that the main function remains blank. Finish the following functions in hw2.c. void vector input (float v[], int n): input the elements of vector v and store in the array. void vector output (float v[], int n): output the elements of vector v on the screen. void vector_add(float v1[], float v2[].float v3[], int n): calculate the sum of vector v1 and v2 and store the result in v3. The sum is a vector, not a single value. void vector multiply (float v[].int n.float x): multiply each element in v by x float inner .product (float v1[], float v2[], int n): return the inner product of vector r1 and v2. float length(float v[], int n): return the length of vector v vector add: (1.2, 3.5, 5.7) + (3.2, 1, 6.3)=(4.4, 4.5, 12) vector multiply: (2.2, 4.1, 6.5) times 3=(6.6, 12.3, 19.5) inner .product: (1, 2, 3) - (4.5, 6)=1 times 4 + 2 times 5 + 3 times 6 = 4 + 10 + 18 = 32 length: length of vector (3, 4, 5) is Squareroot 9 + 16 + 25 = Squareroot 50 = 7.071068

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

Oracle Database 19c DBA By Examples Installation And Administration

Authors: Ravinder Gupta

1st Edition

B09FC7TQJ6, 979-8469226970

More Books

Students also viewed these Databases questions

Question

Provide examples of KPIs in Human Capital Management.

Answered: 1 week ago

Question

What are OLAP Cubes?

Answered: 1 week ago