#include #include #define LEN 5 #define LIMIT 1000 #define BUF_LIM 500 long racineCarree(long n){ for(long i=0; i<(n/2); i++){ if((i*i)==n){ return i; } } return -1; } long* racineCarreeTab(long* tab, int count){ long* rst = (long*) malloc(LIMIT*sizeof(long)); for(long i=0; i= 2){ /*faire avec fichier*/ count=0; if(f==NULL){ printf("ERROR:echec d'ouverture du fichier. EOP"); return EXIT_FAILURE; } while(fgets(buffer, BUF_LIM*sizeof(char), f)){ tableau[count] = strtol(buffer, NULL, 10); count++; } fclose(f); } else { /*faire avec tableau prédéfini*/ for(int i=0; i