Question: I am trying to write a recursive program. A human pyramid is a way of stacking people vertically in a triangle. With the exception of

I am trying to write a recursive program.  I am trying to write a recursive program. A human pyramid

A human pyramid is a way of stacking people vertically in a triangle. With the exception of the people in the bottom row, each person splits their weight evenly on the two people below them in the pyramid. For example, in the pyramid above, the person on the first row is supported by both people on the second row The first person on the last row is supporting half the weight of the person on his left shoulder while the second person on the last row is supporting the other half on his right shoulder, plus he has weight on his left shoulder from the person standing on it. ul Your job is to write a recursive program that will display how much weight a person is holding. You can assume that each person weighs 200 pounds. Your program will ask the user for a row and column and your program will display the weight that is being supported by that person. Your program will continue in a loop- asking the user for a row and column until the use enters 0 and 0 for the row and column. www.shutterstock.com 113454715 Here is an example: Welcome to the Human Pyramid. Select a row, column combination and I will tell you how much weigh that person is supporting. Please type your selections for Row and Column: > 1 1 // User types 1 for row and 1 for column Person at (1,1) is supporting 0 pounds. Please type your selections for Row and Column: >2 1 l/ User types 2 for row and 1 for column Person at (2,1) is supporting 100 pounds. Please type your selections for Row and Column: 43 I/ User types 4 for row and 3 for column Person at (4,3) is supporting 425 pounds. Please type your selections for Row and Column: o 0 I/ User types O for row and O for column Thanks for playing Human Pyramid. Don't let me down! Question: Is there a limit to how tall your pyramid can be

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!