Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Programming Fundamentals
Lab Tasks 10
Before Getting Start, Read Instructions Carefully
Instructions
Work on this lab individually. You can use your books, notes, handouts etc but you are not allowed to borrow
anything from your peer student.
Write down the lab number, task number, and your name and roll number at the start of each task code using
comments.
For Example
/***********************************
Lab: xx
Task: yy
Developer:
Roll #: XXXYYYZ000
Name: XYZ
***********************************/
What you have to do
Program the following tasks then compile and execute them. The name of your files will be according to the task
given in this lab.
Kindly Work According to following Instructions to Get Maximum Marks:
Best of Luck
Total Time: 60 Minutes
Dated: 29 May 2010
Total Marks: 40
Q.1
Write a program that takes 9 numbers as input in a 3 X 3 2D integer array and then display the
contents of the array.
Q.2
Write a program that takes two matrices of order 3 X 3 ,add both matrices and then displays the
resultant matrix.
Q.3
Write a Program that takes two matrices of order 3 X 3, subtract them and then prints the resultant
matrix.
Q.4
Write a Program that takes a 2 X 2 matrix as input from the user and then prints the adjoint of the
matrix.
Q.5
Write a Program that takes a 2 X 2 matrix as input from the user and then prints the determinant of
the matrix.
Q.6
Write a Program that takes a 2 X 2 matrix as input from the user and then prints the inverse of the
matrix.