Sei sulla pagina 1di 2

Total Time: 60 Minutes

Dated: 29 May 2010


Total Marks: 40

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:

 Do Not Try to Copy otherwise you will be Graded ‘F’


 Time is Money, So Utilize it in an efficient Way
 Do Not Put your cpp files in your Z or M Drive
 Properly Comment Your Program and be Carefull about Indenting (Formating) your Program
 Comments and Indentation have Marks
 Feel free to Get Help from us
 A Viva wil be conducted at the end of Given Timeline, so Be Prepared

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.

Potrebbero piacerti anche