# Tabla de multiplicar Ejercicio Java - Curso de Programación Java

### Código

``````import java.util.*;
public class Main
{
public static void main(String[] args)
{
int x;
int result;
System.out.println("Enter a number:");
x = Integer.parseInt(new Scanner(System.in).nextLine());
result = x * 0;
System.out.printf("The result is: %1\$s x %2\$s = %3\$s" + "\r\n", x, 0, result);
result = x * 1;
System.out.printf("The result is: %1\$s x %2\$s = %3\$s" + "\r\n", x, 1, result);
result = x * 2;
System.out.printf("The result is: %1\$s x %2\$s = %3\$s" + "\r\n", x, 2, result);
result = x * 3;
System.out.printf("The result is: %1\$s x %2\$s = %3\$s" + "\r\n", x, 3, result);
result = x * 4;
System.out.printf("The result is: %1\$s x %2\$s = %3\$s" + "\r\n", x, 4, result);
result = x * 5;
System.out.printf("The result is: %1\$s x %2\$s = %3\$s" + "\r\n", x, 5, result);
result = x * 6;
System.out.printf("The result is: %1\$s x %2\$s = %3\$s" + "\r\n", x, 6, result);
result = x * 7;
System.out.printf("The result is: %1\$s x %2\$s = %3\$s" + "\r\n", x, 7, result);
result = x * 8;
System.out.printf("The result is: %1\$s x %2\$s = %3\$s" + "\r\n", x, 8, result);
result = x * 9;
System.out.printf("The result is: %1\$s x %2\$s = %3\$s" + "\r\n", x, 9, result);
result = x * 10;
System.out.printf("The result is: %1\$s x %2\$s = %3\$s" + "\r\n", x, 10, result);
}
}``````

### Más ejercicios Java de Tabla de multiplicar

##### ConversiónCree un programa en Java para convertir de grados Celsius a Kelvin y Fahrenheit: le pedirá al usuario la cantidad de grados Celsius y utilizando las s...

Juan A. Ripoll - Tutoriales de Sistemas y Cursos de Programación© 2024 Todos los derechos reservados.  Condiciones legales.