
-----------------------------------
Krocker
Mon Oct 07, 2013 3:22 pm

Creating a diagonal  periodic table
-----------------------------------
ok so i have to create a diagonal multiplication table, i have managed to make the full table, but unable to get it diagonal.

Something like this (table for 7s)
1
2 4
3 6 9
4 8 12 16
5 10 15 20 25
6 12 18 24 30 36
7 14 21 28 35 42 49  

but i have 
1 2 3 4 5 6 7
2 4 6 8 10 12 14
3 6 9 12 15 18 21
4 8 12 16 20 24 28
5 10 15 20 25 30 35
6 12 18 24 30 36 42
7 14 21 28 35 42 49

Heres my  code so far:

[code]
import java.util.Scanner;

public class question3{
	public static void main (String[] args){
		Scanner userInput = new Scanner (System.in); //creates the input object
		
		int factor = 0;
		int result;
		
		while (factor <  1 || factor > 10){
			System.out.print ("Enter an integer between 1 and 10: ");
			factor = userInput.nextInt();
		}	
		
      // prints main table
		for (int i = 1; i 