Python,C,C++ and JAVA programs for CBSE, ISC, B.Tech and I.T Computer Science and MCA students

The Programming Project: ISC COMPUTER SCIENCE PRACTICALS, 2013

Tuesday, April 15, 2014

ISC COMPUTER SCIENCE PRACTICALS, 2013


/*
Write a program to declare a square matrix A[][] of order (M X M) where 'M'
is the number of rows and the number of columns such that M must be greater
than 2 and less than 20. Allow the user to input integers into this matrix.
Display appropriate error message for an invalid input.
Perform the following tasks:
(a) Display the input matrix.
(b) Create a mirror image of the inputted matrix.
(c) Display the mirror image matrix.
Test your program for the following data and some random data:
Example 1
INPUT : M = 3
4 16 12
8 2 14
6 1 3
OUTPUT :
ORIGINAL MATRIX
4 16 12
8 2 14
6 1 3
MIRROR IMAGE MATRIX
12 16 4
14 2 8
3 1 6
Example 2
INPUT : M = 22
OUTPUT : SIZE OUT OF RANGE
*/
/* ISC COMPUTER SCIENCE PRACTICALS, 2013 */

No comments:

Post a Comment