DEV/BUT1/DEV1.1/CM2 2022/1/programme.c

20 lines
424 B
C
Raw Normal View History

2024-02-01 13:55:03 +01:00
#include <stdlib.h>
#include <stdio.h>
#include "repetition.h"
int main(int argc, char* argv[]){
int i;
long* tab;
tab = (long*) malloc(argc*sizeof(long));
for(i=1;i<argc;i++){
tab[i-1] = strtol(argv[i],NULL,10);
}
if(repetition(tab,argc-1)==0){
printf("Les valeurs sont différentes\n");
}else{
printf("Les valeurs sont identiques\n");
}
return EXIT_SUCCESS;
}