#include <stdio.h>

// calcolo fattoriale di N (N!)
// F = 1 * 2 * 3 * ... * (N-1) * N

int main() {
    int n, i, F, N = 10;

    n = 1;
    while(n<=N) {
        i=2;
        F=1;
        while(i<=n) {
            F = F * i;
            i = i + 1;
        }
        printf("%d! = %d\n",n,F); 
        n = n + 1;
    }

}

Embed on website

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