Question: need help writing this program in c++ Assignment Write a program to calculate several parameters of a ship. We will approximate the ship with an
Assignment Write a program to calculate several parameters of a ship. We will approximate the ship with an using an ellipsoid shape. The equations are from Ellipsoid formulas and Ellipse area websites. The area approximates the surface area of the ship at the waterline. Write a program to calculate the volume of the ship and the and Formulas area of water that the ship occupies. The program should print Volume = 4/3*** width * height* length a welcome message then prompt the user for the required Area =**width * length values, read them in, perform the calculations, then display the = 3.14159265358 results. 7 should be declared a named const Additional Instructions 1. For full credit, the program prompt and output should match the example. Points will be deducted if the output deviates from the example below. 2. Remember to comment your program. 3. When compiling use the following command, assuming your source file is main.cpp: g++ main.cpp -Wall-pedantic Your program should compile with no errors or warnings with the above command. Remember that if the program compiles with errors, this is referred as not compiling, and will get a score of zero. If there are warnings when it compiles, points will be deducted. 1. Compile Errors - prevent the executable, a.out, from being generated. No points will be given if the program does not compile. 2. Compile Warnings - messages from the compiler about possible problems in your code. These should always be corrected. Significant points will be deducted if your program has compiler warnings
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
