1. 1.
    0
    #include<iostream>
    using namespace std;
    unsigned long factfunc(unsigned long);

    int main()
    {
    int n;
    unsigned long fact;
    cout<<"Enter an integer ";
    cin>>n;
    fact=factfunc(n);
    cout<<"factorial of "<<n<<" is "<<fact<<endl;
    }
    unsigned long factfunc(unsigned long n)
    {

    if(n>1)
    return n*factfunc(n-1);
    else
    return 1;

    }
    //bu var
    ···
   tümünü göster