This commit is contained in:
Simoes Lukas
2025-01-07 15:07:12 +01:00
parent f7764aa296
commit 59f7eead89
21 changed files with 475 additions and 16 deletions

14
DEV1.1/CM2/moyenne_main.c Normal file
View File

@@ -0,0 +1,14 @@
# include <stdio.h>
# include <stdlib.h>
# include "moyenne.h"
int main(int argc, char** argv) {
int i;
int* t = malloc(sizeof(int)*argc);
for (i = 0; i != argc-1; i++) {
t[i] = (int) strtol(argv[i+1], NULL, 10);
}
printf("Moyenne : %.2f\n", moyenne(t, argc-1));
free(t);
return EXIT_SUCCESS;
}