$n) $big = $m; if($n > $m) $big = $n; if($n == $m) $big = $m; return $big; } function smallest($m, $n) { if($m < $n) $small = $m; if($n < $m) $small = $n; if($n == $m) $small = $m; return $small; } function nrCuts($m, $n) { if (($m ==1) OR ($n == 1)){ $x = abs($m - $n); } else { $biggest = biggest($m, $n); $smallest = smallest($m, $n); $x = ($biggest -1) * $smallest; } return $x; } echo nrCuts($m, $n); ?>