第21896题 单选题
输入4时,以下C++递归求阶乘程序的输出结果是?

<pre><code>#include <iostream>using namespace std;int fac (int n){ if (n <=1) return 1; else return n * fac (n - 1);}int main (){ int n = 0; cin >> n; int ret = fac (n); cout << ret; return 0;}</code></pre>

{{ option.label }}
子题{{ index + 1 }} {{ child.type_label }}
{{ option.label }}
✓ 正确 ◐ 部分正确 ✗ 错误
程序运行统计
暂无判题统计
知识点:
提交{{ questionInfo.stats ? questionInfo.stats.submit_count : 0 }}次 正确率{{ statsAccuracy }}%
答案解析