Developpement/23DEV1.1/TPS1/TP2/22-Recursive/Curiosity.c

20 lines
268 B
C
Raw Permalink Normal View History

2024-12-09 11:53:11 +01:00
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
int f(int n) {
if (n>100)
return n-10;
else
return f(f(n+11));
}
int main(void)
{
srand(time(NULL));
int final;
int alea = rand()%1000+1000;
final = f(alea);
printf("%d", final);
return 0;
}