返回列表 發帖
  1. #include<bits/stdc++.h>
  2. using namespace std;

  3. int compute(int a)
  4. {
  5.     if(a==1)
  6.         return 1;
  7.     return a*compute(a-1);
  8. }
  9. int main()
  10. {
  11.     int n;
  12.     cin>>n;
  13.     printf("%d!=%d",n,compute(n));
  14.     return 0;
  15. }
複製代碼
Vincent

TOP

返回列表