测评会员优惠活动进行中 · 开通 VIP,有效期内测评不限次 VIP 优惠中 · 测评不限次 立即查看

A68879. 下面程序运行后输入4,输出结果应是#include <iostream>

单选题

题目描述

下面程序运行后输入4,输出结果应是

#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;
}

选项(单选)