
My problem is that I have to change the code so that the user can tell the program which factor that should be the highest one. An example: if the user tells the program that the highest factor should be 4, then the result should be: 1 2 3 4 2 4 6 8 3 6 9 12 4 8 12 16
Thank�´s in advance!
import java.util.Scanner;
class Multiplication
{
public static void main(String args[])
{
int n, c;
System.out.println("Enter an integer to print it's multiplication table");
Scanner in = new Scanner(System.in);
n = in.nextInt();
System.out.println("Multiplication table of "+n+" is :-");
for ( c = 1 ; c <= 10 ; c++ )
System.out.println(n+"*"+c+" = "+(n*c));
}
}

import java.util.Scanner;
class Multiplication
{
public static void main(String args[])
{
int n;
System.out.print("Enter the highest factor:");
Scanner in = new Scanner(System.in);
n = in.nextInt();
int[][] array = new int[11][n+1];
for (int i=1; i<array.length; i++) {
for (int j=1; j<array[i].length; j++) {
array[i][j] = i*j;
System.out.print(" " + array[i][j]);
}
System.out.println("");
}
}
}

thanks alot!