返回列表 發帖
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int compute(int n)
  4. {
  5.     if(n==0)
  6.         return 1;
  7.     else
  8.         return n*compute(n-1);
  9. }
  10. int main ()
  11. {
  12.     int n;
  13.     cin >> n;
  14.     printf("%d!=%d\n",n,compute(n));
  15.     return 0;
  16. }
複製代碼

TOP

返回列表