Anonymous user
Pascal's triangle: Difference between revisions
→{{header|PHP}}: This code wasn't right. The example asks for ten rows and the code is two off. The 2nd number of the last row should be the function argument int. I have corrected the code.
(Undo revision 122668 by 75.2.247.81 (talk) Seems pretty unnecessary.) |
(→{{header|PHP}}: This code wasn't right. The example asks for ten rows and the code is two off. The 2nd number of the last row should be the function argument int. I have corrected the code.) |
||
Line 1,291:
$c = 1;
$triangle = Array();
for($i=
$triangle[$i] = Array();
if(!isset($triangle[$i-1])){
Line 1,304:
}
$tria = pascalsTriangle(
foreach($tria as $val){
foreach($val as $value){
|