如何在php中打印序列36 31 29 24 22 17 15 15
它处于-5,-2模式
您应该交替使用减量值
$start = 36; $end = 15; $x = $start; $delta = 5; while ($x >= $end) { echo "$x<BR>"; $x = $x - $delta; if ($delta == 5) $delta=2; else $delta=5; }