commit b4e70dfc4e38d9002ea5374e74226c96630594b5
parent deb808b9328fcc402ff4ab66be4bf4e6d4c00094
Author: Amit Dutta <amitdutta4255@gmail.com>
Date: Wed, 3 Sep 2025 14:19:01 +0530
Delete practice-c/factorial.c
Diffstat:
1 file changed, 0 insertions(+), 24 deletions(-)
diff --git a/practice-c/factorial.c b/practice-c/factorial.c
@@ -1,24 +0,0 @@
-#include<stdio.h>
-
-int main() {
- int inp, result = 1, i;
- printf("Enter the number to get the factorial : ");
- scanf("%d",&inp);
-
- if (inp < 0 ) {
- printf("\nPlease enter a valid integer. (eg. 1,5)");
- return 0;
- }
-
- if (inp == 0) {
- printf("\nFactorial of 0 : 1");
- return 0;
- }
-
- for (i = 1; i <= inp; i++) {
- result = result * i;
- }
-
- printf("\nFactorial of %d : %d",inp, result);
- return 0;
-}