You are on page 1of 2

Week-5 Practice Sheet

Q1. WAP which gives the sum of two matrices entered by user.
Q2. WAP which displays the product matrix C as C = A * B
Q3. WAP which gives the maximum/ minimum value entered in an array.
Q4. WAP which will sort the array entered by the user.( ascending /descending ).
Q5. WAP to print or access the diagonal element of the matrix (two dimensional array in
java)

Q6. WAP that also calculate the sum of diagonal element of matrix..
Q7. WAP print the stars per line equal to the array element per index let’s suppose an
array named x having 3 element

Q8. Java Program to Print Upper Triangular Matrix

Q9. Java Program to Print Lower Triangular Matrix


Q10. Write a program to remove duplicates from array in Java?
For example if given array is {1, 2, 1, 2, 3, 4, 5} then your program
should return an array which contains just {1, 2, 3, 4, 5}.

You might also like