#include <stdio.h>
int main(void) {
    int n, facto = 1;
    printf("n = ? "); scanf("%d", &n);
    for(int i = 1; i <= n; i++)
    {
        facto = facto * i;
    }
    printf("Factorial: %d \n", facto);
    return 0;
}

Embed on website

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