|
|
@ -334,7 +334,7 @@ int recherdicoetu(listetuinfo *tetu[], int nb, int num){
|
|
|
|
while(d<=f){
|
|
|
|
while(d<=f){
|
|
|
|
m=(d+f)/2;
|
|
|
|
m=(d+f)/2;
|
|
|
|
if(tetu[m]->numeroetu==num){return m;}
|
|
|
|
if(tetu[m]->numeroetu==num){return m;}
|
|
|
|
if(tetu[m]->numeroetu<num){
|
|
|
|
if(tetu[m]->numeroetu>num){
|
|
|
|
f=m-1;
|
|
|
|
f=m-1;
|
|
|
|
}else{
|
|
|
|
}else{
|
|
|
|
d=m+1;
|
|
|
|
d=m+1;
|
|
|
@ -450,11 +450,11 @@ int correspondcarte(char choixville[], char choixdep[], Listchoixdept carte){
|
|
|
|
//ajouter =============================================================================================================================================
|
|
|
|
//ajouter =============================================================================================================================================
|
|
|
|
|
|
|
|
|
|
|
|
void choix(VilleIUT *tville[], int nbville, char choixville[], char choixdep[]){
|
|
|
|
void choix(VilleIUT *tville[], int nbville, char choixville[], char choixdep[]){
|
|
|
|
int i, ok;
|
|
|
|
int i, ok=0;
|
|
|
|
printf("ville : \n");
|
|
|
|
printf("ville : ");
|
|
|
|
fgets(choixville, 31, stdin);
|
|
|
|
fgets(choixville, 31, stdin);
|
|
|
|
choixville[strlen(choixville)-1]='\0';
|
|
|
|
choixville[strlen(choixville)-1]='\0';
|
|
|
|
printf("departement : \n");
|
|
|
|
printf("departement : ");
|
|
|
|
fgets(choixdep, 31, stdin);
|
|
|
|
fgets(choixdep, 31, stdin);
|
|
|
|
choixdep[strlen(choixdep)-1]='\0';
|
|
|
|
choixdep[strlen(choixdep)-1]='\0';
|
|
|
|
ok = correspondville(choixville, choixdep, tville, nbville);
|
|
|
|
ok = correspondville(choixville, choixdep, tville, nbville);
|
|
|
|