debut pile
This commit is contained in:
18
DEV1.1/TP27/curiosite.c
Normal file
18
DEV1.1/TP27/curiosite.c
Normal file
@@ -0,0 +1,18 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
int f(int n) {
|
||||
if (n>100)
|
||||
return n-10;
|
||||
else
|
||||
return f(f(n+11));
|
||||
}
|
||||
|
||||
int main(){
|
||||
int i;
|
||||
for (i=0; i<101; i++)
|
||||
printf("%d\n",f(88));
|
||||
}
|
||||
|
||||
/*Pour les n<101
|
||||
f renvoie 91*/
|
||||
Reference in New Issue
Block a user