Advertisement
Guest User

Untitled

a guest
Apr 25th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1. import java.util.*;
  2. /**
  3.  * Programa que lea un número entero N y muestre la tabla de multiplicar de ese número.
  4.  * @author Enrique
  5.  */
  6. public class TablaMultiplicar {
  7.     public static void main(String[] args) {
  8.         Scanner sc = new Scanner(System.in);
  9.         int n;
  10.         System.out.print("Introduce un número entero: ");
  11.         n = sc.nextInt();
  12.         System.out.println("Tabla del " + n);
  13.         for(int i = 1; i<=10; i++){
  14.              System.out.println(n + " * " + i + " = " + n*i);
  15.         }
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement