How to make Triangle Roll-Up with PHP?

后端 未结 4 382
借酒劲吻你
借酒劲吻你 2020-12-07 04:53

I found a question on google like this :

When given the input : 4, 7, 3, 6, 7

The output like this :

81

40 41

21 19 22

11 10 9 13

4  7          


        
4条回答
  •  借酒劲吻你
    2020-12-07 05:05

    Try this,

    ';
    echo $m.' '.$n.'
    '; echo $j.' '.$k.' '.$l.'
    '; echo $f.' '.$g.' '.$h.' '.$i.'
    '; echo $a.''.$b.' '.$c.' '.$d.' '.$e; ?>

提交回复
热议问题