BUT2/DEV/DEV1.1_suite/TP_Recursivité/Q3_tableau.c

19 lines
295 B
C
Raw Permalink Normal View History

2023-10-23 13:23:36 +02:00
#include <stdio.h>
#include <stdlib.h>
void printTab(double* tab, int taille){
if (taille<=1){
printf("%.2lf\n",*tab);
}
else {
printf("%.2lf, ",*tab);
printTab(tab+1,taille-1);
}
}
int main(void){
double tab[]={8.36,666,3.141592,0,32};
printTab(tab, 5);
return 0;
}