From b372abc14bc5ef0075297f71c3b0e7ecb6718ea6 Mon Sep 17 00:00:00 2001 From: Davi B Date: Fri, 13 Oct 2023 16:05:14 -0300 Subject: [PATCH 1/2] Adding my name on contributions flie --- CONTRIBUTORS.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 492410c8..edf8b765 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -2125,3 +2125,9 @@ Place: India
About: Computer science student
Programming languages: c , cpp, python , ruby , js
Email: rupnamaitra100@gmail.com + +Name: [Davi Batista](https://github.com/Davi-s-Brain) +Place: São Paulo +About: IT student +Programming Language: C, JS, TS, Python, SQL. +Email: batista-davi@outlook.com \ No newline at end of file From dd37974ad0c7d473a10a05603bfb0d492c928813 Mon Sep 17 00:00:00 2001 From: Davi B Date: Fri, 13 Oct 2023 16:33:16 -0300 Subject: [PATCH 2/2] Adding factorial code --- factorial/recursive_factorial.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 factorial/recursive_factorial.c diff --git a/factorial/recursive_factorial.c b/factorial/recursive_factorial.c new file mode 100644 index 00000000..c36913d8 --- /dev/null +++ b/factorial/recursive_factorial.c @@ -0,0 +1,15 @@ +#include + +long factorial(long n) { + if (n == 0) return 1; + return n * factorial(n - 1); +} + +int main() { + long num = 0; + scanf("%li", &num); + + printf("%li\n", factorial(num)); + + return 0; +} \ No newline at end of file