Write a program to declare a square matrix A[][] of order M x M where 'M' is the number of rows and the number of columns, such that M must be greater than 2 and less tham 10.
Write a program which takes 2 digits, X,Y as input and generates a 2-dimensional array. The element value in the i-th row and j-th column of the array should be i*j.