Can anyone help me to spot out where I went wrong here. My code compiled okay but at the end of every line, there is one more digit is displayed.
1 2 3 4 5 6 7 8 9 10 1
2 4 6 8 10 12 14 16 18 20 2
3 6 9 12 15 18 21 24 27 30 3
Like this, for example.
package com.codegym.task.task04.task0434;
/*
Multiplication table
*/
import java.io.*;
public class Solution {
public static void main(String[] args) throws Exception {
//write your code here
int i = 1;
while (i<= 10)
{
int j = 1;
while (j<=10)
{
System.out.print(i*j +" ");
j++;
}
System.out.println(i);
i++;
}
}
}