下面程序运行后输入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; }
4
12
24
48