debut pile
This commit is contained in:
17
DEV1.1/TP26/tableau.c
Normal file
17
DEV1.1/TP26/tableau.c
Normal file
@@ -0,0 +1,17 @@
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
void afficher(double tab[], int taille){
|
||||
if (taille>1){
|
||||
printf("%f, ",tab[0]);
|
||||
afficher(tab+1, taille-1);
|
||||
}else{
|
||||
printf("%f\n",tab[0]);
|
||||
}
|
||||
}
|
||||
|
||||
int main(){
|
||||
double tab[5]={1.25, 47.80, 77.01, 54.23, 895.14};
|
||||
afficher(tab, 5);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
Reference in New Issue
Block a user