Page 1 of 1

Write a recursive method that takes two integer number start and end. The method int evensquare2 (int start, int end) sh

Posted: Fri May 20, 2022 6:17 pm
by answerhappygod
Write A Recursive Method That Takes Two Integer Number Start And End The Method Int Evensquare2 Int Start Int End Sh 1
Write A Recursive Method That Takes Two Integer Number Start And End The Method Int Evensquare2 Int Start Int End Sh 1 (104.57 KiB) Viewed 31 times
java
Write a recursive method that takes two integer number start and end. The method int evensquare2 (int start, int end) should return the square of even number from the start number to the end number. Then, write the main method to test the recursive method. For example: If start = 2 and end = 4, the method calculates and returns the value of: 22 * 42 = 20 If start = 1 and end = 2, the method calculates and returns the value of: 22 = 4 Sample I/O: Enter Number start: 2 Enter Number start: 4 Result = 20 Enter Number start: 1 Enter Number start: 2 II Result = 4