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
Step: 1
Heres a C program that calculates the surface area of a squarebased ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended 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
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App