Question
Please write program in C/C++ and explain the steps for every logic of program because i am not understanding and getting confused. Write a program
Please write program in C/C++ and explain the steps for every logic of program because i am not understanding and getting confused.
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 (a) write a function void mirrorMatrix() to print the MIRROR IMAGE MATRIX
for Example
ORIGINAL MATRIX
4 16 12 8 2 14 4 1 3
MIRROR IMAGE MATRIX
12 16 4 14 2 8 3 1 6
(b)write a function void waterMatrix() to print the WATER IMAGE MATRIX
Water Image is :
1 2 3
4 5 6
7 8 9
- - - - -
7 8 9
4 5 6
1 2 3
(c) write a function void diagnoalMatrix() to print the Mirror of matrix across diagonal
Input : int mat[][] = {{1 2 4 } {5 9 0} { 3 1 7}} Output : 1 5 3 2 9 1 4 0 7
Input : mat[][] = {{1 2 3 4 } {5 6 7 8 } {9 10 11 12} {13 14 15 16} } Output : 1 5 9 13 2 6 10 14 3 7 11 15 4 8 12 16
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started