Question: Java 1) what is output when n = 25? public void f1(int n) { if (n == 0) System.out.printf(Zero); ; System.out.printf(%d, n%2); f1(n/2); } 2)
Java
1) what is output when n = 25?
public void f1(int n) { if (n == 0) System.out.printf("Zero"); ;
System.out.printf("%d", n%2); f1(n/2); }
2) What is output for f(2)?
public int f(int n)
{
if (n == 4)
return n;
else return 2*f(n+1);
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
