#include<iostream>
using namespace std;
int factor(int a){
    int p=1;
    int n=a;
    while(n>0){
        p=p*n;
        n=n-1;
    }
    return p;
}


int main(){
    int a,b;
    cin >>a;
    b=factor(a);
    cout << b;
    
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: