Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

(b) Write a C program that calculates the Surface Area of a Square Based Pyramid. The user will input the height of the Pyramid

image text in transcribed 

(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

Step: 1

Heres a C program that calculates the surface area of a squarebased ... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Vector Mechanics for Engineers Statics and Dynamics

Authors: Ferdinand Beer, E. Russell Johnston Jr., David Mazurek, Phillip Cornwell, Brian Self

11th edition

73398241, 978-0073398242

More Books

Students also viewed these Programming questions