14
examples/tests/simple_recursion_test.c
Archivo normal
14
examples/tests/simple_recursion_test.c
Archivo normal
@@ -0,0 +1,14 @@
|
||||
#include <stdio.h>
|
||||
|
||||
int countdown(int n) {
|
||||
if (n <= 0) {
|
||||
return 0;
|
||||
}
|
||||
printf("n = %d\n", n);
|
||||
return countdown(n - 1);
|
||||
}
|
||||
|
||||
int main() {
|
||||
countdown(3);
|
||||
return 0;
|
||||
}
|
||||
Referencia en una nueva incidencia
Block a user