Assignment No.2 of CS201 fall 2021
Assignment No.02 of CS201InstructionsPlease read the following instructions carefully before submitting the assignment:It should be clear that your assignment will not get any credit if: o Assignment is submitted after the due date.o Submitted assignment does not open or file is corrupt.o Assignment is copied (From internet/students). The software allowed to develop Assignment - Dev C++ Objectives:In this assignment, the students will learn:How to fill a two-dimensional array using given data.How to write user-defined functions and pass an array to them as parameters.How to use if statement and while loop.How to display array elements. Assignment Submission InstructionsYou are required to submit only the .cpp file on the assignments interface of CS201 at VU-LMS. Assignment submitted in any other format will not be accepted and will be graded with zero marks. So, check your solution file format before submission. For any query related to the assignment, please contact cs201@vu.edu.pk. Lectures: 7 to 15 Problem StatementA matrix is given in source data. You have to write user-defined functions and create a menu in C++ keeping in mind the following requirements:Press 1 to display the matrix and its transpose.(Hint: Transpose of a matrix can be achieved by changing its rows into columns or columns into rows.)Press 2 to find adjoint and determinant of the matrix.(Hint: To find the adjoint of a matrix, we change the places of its diagonal elements and the signs of non-diagonal elements; To find the determinant of the matrix, we subtract the product of non-diagonal elements from the product of diagonal elements.)Press any other key to exit. Source data:(Use a two-dimensional array to store following matrix) Instructions to write C++ program: Ø Write functions to display the matrix; find transpose, adjoint, and determinant of the matrix. Following function names should be used for consistency. To display matrixshowMatrix( );To show transposeshowTranspose ( );To show adjointshowAdjoint();To find determinantcalculateDeterminant(); Sample Output:1) When 1 is pressed 2) When 2 is pressed 3) When any other key is pressed Wish you Good Luck! Lectures Covered: This assignment covers Lectures # 07-15.Deadline: The deadline to submit your assignment solution is 8th June 2021. Your assignment must be submitted within the due date through VU-LMS. No assignment will be accepted through email after the due date. See More
from Latest Activity on Virtual University of Pakistan https://ift.tt/3uCmVnq
0 comments:
Post a Comment