Write a program called prism.c that asks the user for the vertices of a rectangu
ID: 3690704 • Letter: W
Question
Write a program called prism.c that asks the user for the vertices of a rectangular prism located in 3-D space. Your program should calculate the surface area and volume of the prism. Name your executable prism.out Use doubles for this program You may need to link in the math library in order to get your program to compile. To do this add the -1m command at the end of your compile statement. Your compile statement should look like: Your program should have at least the following functions get_dist: this will calculate the distance between 2 points get_rect_area: this will calculate the area of rectangle get_surface_area: this will calculate the surface area of the prism and should make use of at least get rectangle get_volume: this will calculate the volume of the prism The points of the cube will be entered from 0 to 7 based on the above diagram Because of rounding issues when creating the cubes, the cubes are not perfect cubes, so it matters what edges you use in your calculations.. To match my answers you must use only edges 0 to 1, 1 to 2, and 3 to 4.Explanation / Answer
main.c
sample input:
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.