I've been staring at this for hours and cannot figure out why it prints an extra number at the end of each line. Any help would be appreciated!
public class Solution {
public static void main(String[] args) {
//write your code here
int i, j;
for (i = 1; i <= 10; i++)
{
for(j = 1; j <= 10; j++)
{
int tbl = i * j;
System.out.print(tbl + " ");
}
System.out.println(i);
}
package com.codegym.task.task03.task0314;
/*
Multiplication table
*/
public class Solution {
public static void main(String[] args) {
//write your code here
int i, j;
for (i = 1; i <= 10; i++)
{
for(j = 1; j <= 10; j++)
{
int tbl = i * j;
System.out.print(tbl + " ");
}
System.out.println(i);
}
}
}