This commit is contained in:
2025-07-02 00:07:49 -07:00
commit c208c6b35d
114 changed files with 71862 additions and 0 deletions

18
c/factorial.c Normal file
View File

@ -0,0 +1,18 @@
#include <stdio.h>
long fact(long n) {
if (n == 0) {
return 1;
}
else return(n*fact(n-1));
}
int main() {
printf("enter a POSITIVE integer... ");
long input;
scanf("%d", &input);
long output = fact(input);
printf("output: %lld\n", output);
return 0;
}