# include # include # 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; }