Driver Code
$ mat = array ( array ( 4 , 7 , 0 , 3 ) , array ( 8 , 5 , 6 , 1 ) , array ( 9 , 11 , 10 , 2 ) , array ( 15 , 13 , 14 , 12 ) ) ; $ n = 4 ; echo " Total ▁ energy ▁ required ▁ = ▁ " , calculateEnergy ( $ mat , $ n ) , " ▁ units " ; ? >