Question:

What is the output of this program?

    #include <iostream>
    using namespace std;
    long factorial (long a)
    {
        if (a > 1)
            return (a * factorial (a + 1));
        else
            return (1);
    }
    int main ()
    {
        long num = 3;
        cout << num << "! = " << factorial ( num );
        return 0;
    }

 

Answers:


Keywords:

© 2017 QuizBucket.org