In order to reach the top of a pole, a monkey in his first attempt reaches to a height of 5 feet and in the subsequent jumps, he slips down by 2% of the height attained in the previous jump. The process repeats and finally the monkey reaches the top of the pole. Write a program in Java to input the height of the pole. Calculate and display the number of attempts the monkey makes to reach the top of the pole.
Answers
Answered by
1
Answer:
In order to reach the top of a pole, a monkey in his first attempt reaches to a height of 5 feet and in the subsequent jumps, he slips down by 2% of the height attained in the previous jump. The process repeats and finally the monkey reaches the top of the pole. Write a program in Java to input the height of the pole. Calculate and display the number of attempts the monkey makes to reach the top of the pole.
Explanation:
Hope this helps you mate xD
Answered by
5
Answer:
Sweet nd simple..
Similar questions