[ create a new paste ] login | about

Link: http://codepad.org/K1QaHfPl    [ raw code | output | fork ]

Ruby, pasted on Jul 12:
1
2
3
4
5
6
7
8
9
10
4.times {|selfRow|

    4.times{|i|
        col = i+1
        row = i+1
        print "m1._#{selfRow+1}#{col} * m2._#{row}1 + "
       puts "\n"
    }
    puts "\n"
}


Output:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
m1._11 * m2._11 + 
m1._12 * m2._21 + 
m1._13 * m2._31 + 
m1._14 * m2._41 + 

m1._21 * m2._11 + 
m1._22 * m2._21 + 
m1._23 * m2._31 + 
m1._24 * m2._41 + 

m1._31 * m2._11 + 
m1._32 * m2._21 + 
m1._33 * m2._31 + 
m1._34 * m2._41 + 

m1._41 * m2._11 + 
m1._42 * m2._21 + 
m1._43 * m2._31 + 
m1._44 * m2._41 + 



Create a new paste based on this one


Comments: