#include #include "SAE.h" #define LEN 100 int chargementClients(int *t1, int *t2, int tmax){ //charge les tableaux FILE *fe; int numClient, points; fe=fopen("Adherents.txt","r"); if(fe==NULL){ printf("Probleme ouverture fichier"); return -1;} int i=0; fscanf("%d%*c %d%*c",&numClient,&points); 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; fscanf("%d%*c %d%*c",&numClient,&points); i++; } fclose(fe); return i; } int rechercheAdherent(int *t1, int *t2,int val,int LENlo,int *trouve){//recherche un adherent et affiche sont identifiant int i; for (i=0;i0){ prix=pts*0.5; printf("Voulez vous saisir plus de points?(10pts=5€)"); scanf("%d",&pts);} printf("Vous avez acheté %d pts pour %.2f €.",pts,prix); }