캬캬백곰 2012. 4. 25. 14:57
728x90

 

 

결과)

1

2    1

3    2    1

4    3    2    1

5    4    3    2    1

과 같은 결과를 출력한다.

 public static void main(String[] args) {
  //
  
  for(int i=1; i<6; i++){
   for(int j=i; j>0; j--){
    
    System.out.print(j+"\t");
    
   }
   System.out.println();
  }

 

728x90
반응형