+ 1

Matrix

Costruct a 3x3 matrix by getting values for first row and first column as input and remaining elements using following rule Value of an element is the multiplication product of its adjacent elements ie top and left Mij = Mi(j-1) * M(i-1)J E.g 9 3 5 4 12 60 2 24 1440

3rd Feb 2018, 3:59 PM
karikalan adhi
karikalan adhi - avatar
5 Respostas
+ 18
1) initialize a 2d array [3][3] 2)assign values to arr [0][] using a loop 3)assign value to arr [][0] using aloop 3)now,its time to assign value to all other elements 4)run two loops 1 for rows & 1 for columns inside that for (int a=1;a <3;a++) for (int b=1;b <3;b++) arr [a][b]=arr [a][b-1]*arr [a-1][b]; //hope it helps
3rd Feb 2018, 4:10 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 16
i don't know python , u hv to convert the above code & idea into a python code by yourself only
3rd Feb 2018, 5:23 PM
Gaurav Agrawal
Gaurav Agrawal - avatar
+ 1
Any one tell me how to write program for above question?
3rd Feb 2018, 4:03 PM
karikalan adhi
karikalan adhi - avatar
+ 1
Thanks gaurav Can you tell me in python language
3rd Feb 2018, 5:16 PM
karikalan adhi
karikalan adhi - avatar
0
Thanks bro
9th Feb 2018, 2:25 AM
karikalan adhi
karikalan adhi - avatar