Question: *C not C++* Write a complete program that will prompt the user for two floating point numbers, then use them to calculate the following geometric
*C not C++*
Write a complete program that will prompt the user for two floating point numbers, then use them to calculate the following geometric values. Using values named height and width, find:
area of rectangle volume of cube, using width as all sides surface area of cube, using height as all sides surface area of sphere, using width as radius volume of sphere, using height as radius area of ellipse, using height and width as the semi-major and semi-minor axes, respectively
Use the following prompts for the input values copy and paste them into your program.
"Enter height: " " Enter width: "
Print a newline immediately after you have input the second value.
Display the resulting values to 3 decimal places, followed by a newline. Do not label the outputs.
Use the value of pi that is in the math library. Use the power function for any exponents above 2.
Formulas:
Area of rectangle height times width Volume of cube length of one side ^3 Surface area of cube six time the area of one face Surface area of sphere four times pi times radius^2 Volume of sphere four thirds times pi times radius^3 Area of ellipse pi times semi-major axis times semi-minor axis
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
