Advertisement
Guest User

Untitled

a guest
Nov 24th, 2015
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.68 KB | None | 0 0
  1. package javaapplication4;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class JavaApplication4
  6. {
  7.  
  8.     public static void main(String[] args)
  9.     {
  10.         int numero = 0;
  11.         int contador = 1;
  12.         int aux = 0;
  13.         Scanner teclado = new Scanner(System.in);
  14.         System.out.println("Introduzca el número");
  15.         numero = teclado.nextInt();
  16.        
  17.  
  18.         for (int i = numero; i > 0; i--)
  19.         {
  20.             aux = numero;
  21.             for (int j = 1; j <= contador; j++)
  22.             {
  23.                 System.out.print(aux);
  24.                 aux--;
  25.             }
  26.             contador++;
  27.             System.out.println();
  28.         }
  29.        
  30.    
  31.     }
  32.    
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement