APL/APL1.2/TP08/tableau.c

17 lines
330 B
C
Raw Normal View History

2022-01-10 17:28:28 +01:00
#include <stdio.h>
#include <stdlib.h>
void printTable(double* t, int n) {
if (n > 0) {
printf("%.5lf", *t);
if (n > 1) printf(", ");
printTable(t+1, n-1);
} else puts("");
}
int main(void) {
double t[5] = {1.72, 5.28, 9.025, 36.14, 3.14159};
printTable(t, 5);
return EXIT_SUCCESS;
}