Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

C program using reference parameters and arrays as parameters ------------------write a program to read in x, y and z coordinates -for the tips of two

C program using reference parameters and arrays as parameters

------------------write a program to read in x, y and z coordinates

-for the tips of two vectors in 3-space, and store each in a 1-dimensional array

-program should then call two programmer-defined functions, vectorsum and vectordiff

-which will add and subtract the vectors

-Each of these functions has three parameters: an array representing the first vector, array representing the second vector, third array which will hold the vector resulting from the vector arithmetic operation

-------write a third programmer-defined function, vectorminmax

-which will determine the largest and smallest coordinates of the two vectors

-Vectorminmax has four parameters, two arrays representing the vectors, two variables to hold the minimum and maximum coordinate. ( last two are reference parameters)

-main function should read in two vectors; call vectorsum, vectordiff, and vectorminmax; then print out components of the vectors read, the components of the sum and difference vectors, and the minimum and maximum coordinate values.

Post Code please

--------------copy the code and and modify but as a new code so I may see the difference please. The first code functions written that are solved only work for vectors in 3-space

-Make functions more general by modifying them to work for vectors of any positive- dimensional space by adding a parameter that holds the number of dimensions the vectors have

Please post second code so I may see the change please.

Thank you

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

Computer Aided Database Design

Authors: Antonio Albano, Valeria De Antonellis, A. Di Leva

1st Edition

0444877355, 978-0444877352

More Books

Students also viewed these Databases questions

Question

3. Would you say that effective teamwork saved their lives?

Answered: 1 week ago