fork download
  1.  
Success #stdin #stdout 0.04s 25716KB
stdin
#include <stdio.h>

int main() {
    int n, i;
    long long fact = 1;

    printf("Enter a positive integer: ");
    scanf("%d", &n);

    for(i = n; i >= 1; i--) {
        fact *= i;
    }

    printf("Factorial of %d is %lld\n", n, fact);
    return 0;
}
stdout
Standard output is empty