DEV/DEV1.1/TP16:Recursivite/tableau.c
2022-12-14 15:31:36 +01:00

20 lines
360 B
C

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void afficheTabRec(double tab[],int taille){
if(taille==0){
} afficheTabRec(tab, taille-1);
printf("%f, ",tab[taille-1]);
}
int main(){
int i;
double tab[15]=malloc(sizeof(double));
srand(time(NULL));
for (i=0;i<15;i++){
tab[i]=(rand()%1000);
}
afficheTabRec(tab, sizeof(tab));
return 0;
}