#include #include "SAE.h" #define LEN 100 int chargementClients(int* t1, int* t2, int* t3, int tmax){ //charge les tableaux FILE *fe; int numClient, points,ptsDepense; fe=fopen("Adherents.txt","r"); if(fe==NULL){ printf("Probleme ouverture fichier"); return -1;} int i=0; fscanf("%d%*c %d%*c %d%*c",&numClient,&points,&ptsDepense); while(feof(fe)==0){ if(i>tmax){ printf("taille du tableau dépassée \n"); fclose(fe); return-1;} t1[i]=numClient; t2[i]=points; t3[i]=ptsDepense; fscanf("%d%*c %d%*c %d%*c",&numClient,&points,&ptsDepense); i++; } fclose(fe); return i; } int rechercheAdherent(int *t1, int val, int LENlo, int *trouve){//recherche un adherent et affiche sont identifiant int i; for (i=0;i=100){ printf("Vous avez gagné 10pts bonus."); t3[i]=t3[i]-100; t2[i]=t2[i]+10; } } return 0; }