PFLAB10
PFLAB10
(MSc-CS-F19 Morning)
Lab # 10
Instructions:
Task 1: Write a program that take input in 2D array of and perform the following operations on 2D
array:
i) Display it as a matrix.
Task 2: Write a program that take input in two 2D arrays of integer of size 4x4 and find the addition and
multiplication these arrays.
Task 3: Write a program that take input in 2D array and check whether the matrix is Symmetric or not.
Task 4: Write a program that take input in 2D array and check whether the matrix is Identity matrix or
not.
Hint: A matrix is Identity matrix if its all diagonal values are 1 and non-diagonal values are 0.
Task 6: Write a program to find the sum of upper and lower triangular matrix.
4 5 6
7 8 9
1 2 3 4 5
16 17 18 19 6
15 24 25 20 7
14 23 22 21 8
13 12 11 10 9
Task 8: Write a program that take input of 5 students, Input contain rollNo , studentName, fatherName,
city, degree and CGPA.
For Example:
Input:
Output:
Note: Strictly Follow the input and output as mention in above Example.
VERY IMPORTANT
In the next Lab, you will need some or all of the programmes from Today’s Lab. So, make sure that you
have the working implementation of ALL the programmes of Today’s Lab, when you come to the next
Lab.