Question: Write a method that does the following: 1) takes an integer value as a parameter 2) returns false if the parameter is less than 1
Write a method that does the following:
1) takes an integer value as a parameter
2) returns false if the parameter is less than 1
3) uses a while loop to decrement the parameter by 1 until it reaches 0
4) Prints the sum of the parameter * 10 each iteration of the while loop
5) returns true at the completion of the while loop
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
