Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package javaapplication4;
- import java.util.Scanner;
- public class JavaApplication4
- {
- public static void main(String[] args)
- {
- int numero = 0;
- int contador = 1;
- int aux = 0;
- Scanner teclado = new Scanner(System.in);
- System.out.println("Introduzca el número");
- numero = teclado.nextInt();
- for (int i = numero; i > 0; i--)
- {
- aux = numero;
- for (int j = 1; j <= contador; j++)
- {
- System.out.print(aux);
- aux--;
- }
- contador++;
- System.out.println();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement