Happy About the progress

This commit is contained in:
2026-05-28 10:16:10 +00:00
commit 79415e38db
92 changed files with 1326 additions and 0 deletions
+23
View File
@@ -0,0 +1,23 @@
#include <cs50.h>
#include <stdio.h>
int factorial(int n);
int main(void)
{
int n = get_int("Factorial of: ");
printf("Factorial of %i is %i\n", n, factorial(n));
}
int factorial(int n)
{
// Base case
if (n == 0)
{
return 1;
}
// Recursive case
return n * factorial(n - 1);
}