fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. int linha, space, coluna;
  13.  
  14. for(linha = 10;linha > 0; linha--){
  15.  
  16. for(space = 10; space > linha; space--){
  17. System.out.print(" ");
  18. }
  19.  
  20. for(coluna = 0; coluna < linha; coluna++){
  21. System.out.print(coluna+" ");
  22. }
  23. System.out.println();
  24. }
  25.  
  26. }
  27. }
Success #stdin #stdout 0.04s 711168KB
stdin
Standard input is empty
stdout
0 1 2 3 4 5 6 7 8 9 
  0 1 2 3 4 5 6 7 8 
    0 1 2 3 4 5 6 7 
      0 1 2 3 4 5 6 
        0 1 2 3 4 5 
          0 1 2 3 4 
            0 1 2 3 
              0 1 2 
                0 1 
                  0