Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class MulTableGeneration
- {
- int[][] A= new int[1000][1000];
- int row, col;
- MulTableGeneration(int row, int col)
- {
- this.row=row;
- this.col=col;
- for(int i=0; i <=row;i++)
- {
- for(int j=0; j<=col;j++)
- {
- A[i][j] = i*j;
- }
- }
- }
- void Show()
- {
- for(int i=0; i <=row;i++)
- {
- for(int j=0; j<=col;j++)
- {
- System.out.print(A[i][j] +" ");
- }
- System.out.println();
- }
- }
- /**
- * @param args
- */
- public static void main(String[] args)
- {
- System.out.println("Enter Row: ");
- Scanner sc = new Scanner(System.in);
- int i=sc.nextInt();
- System.out.println("Enter Colum: ");
- int j=sc.nextInt();
- // TODO Auto-generated method stub
- MulTableGeneration ml =new MulTableGeneration(i, j);
- ml.Show();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement