Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Programming Language: JAVA Recursion program A human pyramid is a way of stacking people vertically in a triangle. With the exception of the people in
Programming Language: JAVA
Recursion program
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 pcople 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 his left shoulder while the second person on uil 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. 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 enters 0 and 0 for the row and column. Here is an example: the user for a row and column until the use www.shutterstock.com 113454715 Welcome to the Human Pyramid. Select a row, column combination and I will tell you how much weight that person is supporting Please type your selections for Row and Column: 1 1 I/User types 1 for row and 1 for column ban car Person at (1,1) is supporting 0 pounds. Please type your selections for Row and Column: ba . 2 1 // 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: 4 3 // 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: 00 //User types 0 for row and 0 for column Thanks for playing Human Pyramid. Don't let me down! Question: Is there a limit to how tall your pyramid can be? 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 pcople 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 his left shoulder while the second person on uil 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. 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 enters 0 and 0 for the row and column. Here is an example: the user for a row and column until the use www.shutterstock.com 113454715 Welcome to the Human Pyramid. Select a row, column combination and I will tell you how much weight that person is supporting Please type your selections for Row and Column: 1 1 I/User types 1 for row and 1 for column ban car Person at (1,1) is supporting 0 pounds. Please type your selections for Row and Column: ba . 2 1 // 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: 4 3 // 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: 00 //User types 0 for row and 0 for column Thanks for playing Human Pyramid. Don't let me down! Question: Is there a limit to how tall your pyramid can beStep by Step Solution
There are 3 Steps involved in it
Step: 1
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 Started