재귀함수
public class RecursiveCall { public static int power(int x,int y){ /* 1번 방법 */ // if(y0){ sum = sum * x; y--; } return sum; } public static void main(String[] args) { System.out.println("power(2,1) : "+power(2,1)); System.out.println("power(2,2) : "+power(2,2)); System.out.println("power(2,3) : "+power(2,3)); System.out.println("power(2,4) : "+power(2,4)); System.out.println("power(2,5) : "+powe..
더보기