Need Help ?

Home / Expert Answers / Other / Goal: learn to write do-while loops. In developing an algorithm for a new fitness app, you are taske

Goal: learn to write do-while loops. In developing an algorithm for a new fitness app, you are taske ...


Goal: learn to write do-while loops. In developing an algorithm for a new fitness app, you are tasked with calculating the cumulative elevation gain for a 50-step stair-climbing challenge. Each step increases in height exponentially, starting from 1 meter for the first step and doubling the height increase for each subsequent step. Given long variables totalElevation and step that have already been declared, use a do-while loop to calculate the total elevation gain over 50 steps, with each step's elevation gain being twice the previous step's gain (starting from 1 meter for the first step). Store this cumulative elevation in totalElevation. For example, the elevation gain sequence starts 1, 2, 4, 8, and so on, doubling each time. Make the code as concise as possible.



Radioactive Tutors

Radio Active Tutors is a freelance academic writing assistance company. We provide our assistance to the numerous clients looking for a professional writing service.

NEED A CUSTOMIZE PAPER ON THE ABOVE DETAILS?
Order Now


OR

Get outline(Guide) for this assignment at only $10

Get Outline $10

**Outline takes 30 min - 2 hrs depending on the complexity and size of the task
Designed and developed by Brian Mubichi (mubix)
WhatsApp