Question: (b) Write a C program that calculates the Surface Area of a Square Based Pyramid. The user will input the height of the Pyramid
(b) Write a C program that calculates the Surface Area of a Square Based Pyramid. The user will input the height of the Pyramid and the length of one of the square sides from the keyboard in that order. The Surface Area is given by this formula: Surface Area = (length x length) + 2 x length x [ (height x height) + (length x length) ] Your code should check that the values entered are valid and produce the following example output: Height of Pyramid is 32.4m Length of Pyramid is 23.0m Surface Area of Square Based Pyramid is 2357 square meters [10 Marks]
Step by Step Solution
There are 3 Steps involved in it
Heres a C program that calculates the surface area of a squarebased ... View full answer
Get step-by-step solutions from verified subject matter experts
