Question: Write a C program that takes two positive real numbers from the user as the base edge, a , and height, h , of a

Write a C program that takes two positive real numbers from the user as the base
edge, a, and height, h, of a right square pyramid. See Figure 1. The program should
then print on the screen the following information in a well-formatted tabular
arrangement.
Base area of the pyramid, AB, in 3 significant digits.
Surface area of the pyramid, AS, in 4 significant digits.
Volume of the pyramid, V, in 4 significant digits.
Figure 1: A right square pyramid with its base edge, a, height, h.
Use the following formulae for the base area, surface area, and volume:
AB=a2,
AS=a2+2aa24+h22,
V=a2h3.
 Write a C program that takes two positive real numbers from

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!