#include <stdio.h>

int main() {
    int a, b, c =1;
    printf("\nDigite o numero: \n");
    scanf("%i", &a);
    for(b = a; b > 1; b--)
	{
    c *= b;
    }
    printf("O fatorial de %i e: %i", a, c);
}

Embed on website

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