Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

public class FunFun Fun public static void main String args) Fun Fun una app new

ID: 3848994 • Letter: P

Question

public class FunFun Fun public static void main String args) Fun Fun una app new Fun Fun Fun System. out rintln (app. fastCount Down (3 app gcd (1440, 408, 0); System. out. println "T (4) app.eTime (4 public string fastcountDown ter here code here public int god parameter (s here f code here public int e Time parameter here code here fastCountDown0 Write a recursive method that counts down by twos. Should return a string of all numbers counted with a space after each one. Here's the output for system. out.println(fastcountDown (7)) 7 5 3 1 Here's the output for system. out.println(fastcountDown(6)) 6 4 2 0

Explanation / Answer

public String fastCountDown(int i) {
  if (i == 0 || i==1)
   return Integer.toString(i);
  else
     return Integer.toString(i) + " " + fastCountDown(i-2);
}