#include <stdio.h>
#include <stdlib.h>
#include <locale.h>
main(){
setlocale(LC_ALL, "Portuguese");
int fat, n;
printf("Insira um valor para o qual deseja calcular seu fatorial: ");
scanf("%d", &n);
for(fat = 1; n > 1; n = n - 1)
fat = fat * n;
printf("\nFatorial calculado: %d", fat);
}
To embed this project on your website, copy the following code and paste it into your website's HTML: