Factorial test.
所有检测均成功
The build was successful.

这个提交包含在:
Rafal Kupiec 2019-02-07 18:29:53 +01:00
父节点 6a74bf9e8b
当前提交 6927c5c038
签署人:: belliash
GPG 密钥 ID: 4E829243E0CFE6B4
共有 2 个文件被更改,包括 16 次插入0 次删除

15
tests/factorial_test.aer 普通文件
查看文件

@ -0,0 +1,15 @@
class Program {
function factorial(int $num) {
if($num == 0 || $num == 1)
return 1;
else
return $num * $this->factorial($num - 1);
}
function main() {
int $num = 7;
print('Factorial of ', $num, ' is ', $this->factorial($num), '.');
}
}

1
tests/factorial_test.exp 普通文件
查看文件

@ -0,0 +1 @@
Factorial of 7 is 5040.