class Solution {
/**
* @param Integer $n
* @return Integer
*/
function sumNums($n) {
$num = 0;
$n>0 and $num = $n + $this->sumNums($n-1);
return $num;
}
}
class Solution {
/**
* @param Integer $n
* @return Integer
*/
function sumNums($n) {
$num = 0;
$n>0 and $num = $n + $this->sumNums($n-1);
return $num;
}
}