Question
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
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