Question: Write a C + + program that use struct to represent 3 D point coordinate ( x , y , z . It asks user
Write a C program that use struct to represent D point coordinate It asks user for two D point coordinates and output the midpoint of the two points.
a In main get the input values from the user and store them in two struct variables for two D points P and P
b Create a function to calculate the midpoint This function takes two struct variables D points P and P as input parameters and returns a struct variable for midpoint.
c In main call the userdefined function to get the midpoint and output the coordinate of the midpoint
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
