From 411a0232a98cf85152187249ddbeb8133420da58 Mon Sep 17 00:00:00 2001 From: Saksham Arneja Date: Sat, 12 Oct 2019 21:09:47 +0530 Subject: [PATCH] Fixed issue#397 Declared n and added printf with call to function. --- Maths/Factorial/C/factorial.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Maths/Factorial/C/factorial.c b/Maths/Factorial/C/factorial.c index 818b68ce..eb16373d 100644 --- a/Maths/Factorial/C/factorial.c +++ b/Maths/Factorial/C/factorial.c @@ -11,6 +11,9 @@ long long factorial(long long n) { } int main(int argc, char * argv[]) { - printf("Enter a number"); - scanf("%d",&n); + + long long n; + printf("Enter a number: "); + scanf("%lld",&n); + printf("Factorial = %lld\n", factorial(n)); }