My code is this
public class temp
{
public static void main(String[] args)
{
for (int i = 1; i <= 4; i++)
{
for (int j = 1; j <= 6; j++)
{
System.out.print((i*j)*4-3 + " ");
}
System.out.println();
}
}
}
I'm getting:
1 5 9 13 17 21
5 13 21 29 37 45
9 21 33 45 57 69
13 29 45 61 77 93
The output should be:
1 5 9 13 17 21
2 6 10 14 18 22
3 7 11 15 19 23
4 8 13 16 20 24
Can't figure out what I'm doing wrong.
Please help
Thanks,
Jeff