#include <iostream.h>
int main() 
{
    int i, n, factorial = 1;

    cout<<"Enter a Positive Name integer: ";
    cin>>n;

    for (i = 1; i <= n; ++i) {
        factorial *= i;   // factorial = factorial * i;
    }

    cout<< "Factorial of "<<n<<" = "<<factorial;
    return 0;
}
OUTPUT
Enter a Postive Number : 4
Factoril of 4 = 24

Leave a Reply

Subscribe to Posts | Subscribe to Comments

All Notes on BCA

All Notes  on BCA
BCA all subjects notes

Total Pageviews

Translate

Powered by Blogger.

Copyright © All Notes on BCA