Identification division.
Program-id.
Environment division.
Data division.
Working-storage section.
01 array.
02 x occurs 4 times.
03 y occurs 4 times.
04 a pic 9(2).
04 b pic 9(2).
04 c pic 9(3).
77 m pic 9.
77 n pic 9.
77 i pic 9.
77 j pic 9.
77 e pic 9.
77 p pic zz9.
Procedure division.
Main-para.
Display " enter the order of the matrices ".
Accept m.
Accept n.
Compute e = m * n.
Move 2 to lin.
Move 3 to col.
Display " enter " e " numbers for first matrix ".
Perform x-para varying i from 1 by 1 until i > m
after j from 1 by 1 until j > n.
Display " enter " e " numbers for second matrix ".
Perform y-para varying i from 1 by 1 until i > m
after j from 1 by 1 until j > n.
Perform c-para varying i from 1 by 1 until i > m
after j from 1 by 1 until j > n.
Display ( 1 , 1 ) erase.
Display " the sum of the two matrices is ".
Perform d-para varying i from 1 by 1 until i > m
after j from 1 by 1 until j > n.
Stop run.
X-para.
Accept a( i , j ).
Y-para.
Accept b( i , j ).
C-para.
Compute c( i , j ) = a( i , j ) + b( i , j ).
D-para.
Move c( i , j ) to p.
Display ( lin , col ) p.
Compute col = col + 3.
If ( j = n )
compute lin = lin + 1
move 3 to col.
Let c = a+b
write a program in C that prompts the user with the following lines: a) Add two integers c) Compare two integers for the larger t) Test an integers for odd or even q) Quit
Use the Array Package. if you need help - add me on msn james_mc_123@hot dkjdkdjd mail.comp
For the resulting matrix, just add the corresponding elements from each of the matrices you add. Use coordinates, like "i" and "j", to loop through all the elements in the matrices. For example (for Java; code is similar in C):for (i = 0; i
"Mean" usually means "average", so you just add the numbers together, then divide by 8.
No.
write ashell script to add awo matrix using array.
yes ,i can add the website link in java program when we write.
write it in 8085
They must have the same dimensions.
The usual rules of addition of fractions apply.
Let c = a+b
GOUDHMARINI
Mov a.#000ff, mov b,#0008f add a,b
You add matrices by adding their respective terms - e.g. the element in the first row and sixth column of the sum is the sum of the elements in the addends' first rows and sixth columns. Wikipedia has a nice example of matrix addition that I linked below.
Just open the program and follow the directions on it. There is a multitude of actions you can perform.
No. You can only add matrices of the same size.