0
내가 4 번을 표시합니다 (6) 두 번 표시하려면 난 다음 재귀를 사용하여이 6666 같은 서로 에 예를 두 번 지정된 시간이 주어진 숫자를 표시하려면이 질문이 코드가 있지만 그것은 스택 오버플로 누군가가 제발 내가이 재귀 새로 도움이 될 수 있습니다.표시 행
public static int i = 6;
public static int j = 2;
/**
* @param args the command line arguments
*/
public static void main(String[] args) throws IOException {
System.out.print(addToTarget(i, j));
}
public static int addToTarget(int n, int x){
int index = 0;
if (index !=j*2){
System.out.print(i);
index+=1;
return addToTarget(i,index);
}
return i;
}
예. 지저분한 축하합니다 ... 도와 주셔서 너무 감사드립니다. – yousef