A
This commit is contained in:
14
DEV1.1/CM2/moyenne_main.c
Normal file
14
DEV1.1/CM2/moyenne_main.c
Normal 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;
|
||||
}
|
Reference in New Issue
Block a user