please give me codes for the following question
Write a program to find substraction of matrix of size 5*5(5 rows & 5 coloums)
1 reply to this topic
#1
Posted 20 May 2011 - 06:31 AM
|
|
|
#2
Posted 20 May 2011 - 12:01 PM
We can't just paste code.
To help you getting started, you can create two 2D arrays of 5X5 each. Check if the input matrix rows and columns are equal to each other.
Then you run two nested loops.
// pseudo code
To help you getting started, you can create two 2D arrays of 5X5 each. Check if the input matrix rows and columns are equal to each other.
Then you run two nested loops.
// pseudo code
while (row from 1 to 5) while (column from 1 to 5) subtract Matrix2[row][column] from Matrix1[row][column] end column while end row while
Edited by fayyazlodhi, 20 May 2011 - 12:03 PM.
indentation
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









