#include <stdio.h>
int main()
{
int c, n, fact = 1;
printf("Enter a number to calculate its factorial\n");
scanf("%d", &n);
for (c = 1; c <= n; c++)
fact = fact * c;
printf("Factorial of %d = %d\n", n, fact);
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CiAKaW50IG1haW4oKQp7CiAgaW50IGMsIG4sIGZhY3QgPSAxOwogCiAgcHJpbnRmKCJFbnRlciBhIG51bWJlciB0byBjYWxjdWxhdGUgaXRzIGZhY3RvcmlhbFxuIik7CiAgc2NhbmYoIiVkIiwgJm4pOwogCiAgZm9yIChjID0gMTsgYyA8PSBuOyBjKyspCiAgICBmYWN0ID0gZmFjdCAqIGM7CiAKICBwcmludGYoIkZhY3RvcmlhbCBvZiAlZCA9ICVkXG4iLCBuLCBmYWN0KTsKIAogIHJldHVybiAwOwp9