Created
          February 13, 2014 03:33 
        
      - 
      
- 
        Save pepet96/8969307 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import java.util.Scanner; | |
| public class table { | |
| public static void main (String [] args) { | |
| Scanner input = new Scanner(System.in); | |
| int params = input.nextInt(); | |
| int[][] n = new int[params][params]; | |
| n = initialize(params); | |
| for (int row = 0; row < n.length ; row++) | |
| { | |
| for (int column = 0; column < n[row].length; column++) | |
| { | |
| System.out.print(n[row][column]); | |
| } | |
| System.out.println(); | |
| } | |
| } | |
| public static int[][] initialize(int params) | |
| { | |
| int [][] hello = new int[params][params]; | |
| for (int row = 0; row < hello.length ; row++) | |
| { | |
| for (int column = 0; column < hello[row].length; column++) | |
| { | |
| hello[row][column] = (row+1)*(column+1); | |
| } | |
| } | |
| return hello; | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment