fix bug et test fonction niquel

master
cyriaklinux 1 year ago
parent ade44868aa
commit 4176158f3b

@ -273,7 +273,6 @@ void modifclientglobal (void)
}
}
coderreur=enregistrement(tabNC,tabCAG,tabsuspension,&n);
printf("Au revoir !\n");
return;
}
@ -332,7 +331,7 @@ int ajoutClient (int tabNC[],float tabCAG[],int tabsuspension[],int *tlogique,in
}
while (numeroclient<0)
{
printf("le numéro du client ne peut être négatif , réessayez\n'999' pour quitter.");
printf("le numéro du client ne peut être négatif , réessayez\n'999' pour quitter.\n");
scanf("%d",&numeroclient);
if (numeroclient==999)
{
@ -438,18 +437,17 @@ int suspensioncarte (int tabNC[],float tabCAG[],int tabsuspension[],int *tlogiqu
scanf("%d",&nouvellecarte);
}
for (compteur=0;compteur<=*tlogique;compteur++)
{
while (nouvellecarte==tabNC[compteur])
while (tabNC[compteur]==nouvellecarte)
{
printf("le client existe déja, ressaisissez\n");
scanf("%d",&nouvellecarte);
while(nouvellecarte<0){
while(nouvellecarte<0)
{
printf("le numéro ne peut étre négatif , rééssayez.\n");
scanf("%d",&nouvellecarte);
}
}
}
tabNC[*tlogique]=nouvellecarte;
tabCAG[*tlogique]=tabCAG[compteurCAG];
@ -458,16 +456,10 @@ int suspensioncarte (int tabNC[],float tabCAG[],int tabsuspension[],int *tlogiqu
printf("état de suspension modifié et nouvelle carte crée !\n");
return 0;
}
if (tabsuspension[compteurCAG]==0)
{
printf("état de suspension modifié !\n");
return 0;
}
}
}
int supressionclient (int tabNC[],float tabCAG[],int tabsuspension[],int *tlogique,int tmax)
{
@ -482,7 +474,7 @@ int supressionclient (int tabNC[],float tabCAG[],int tabsuspension[],int *tlogiq
}
while(recherche<0)
{
printf("ne peut étre négatif\n'999' pour quitter.");
printf("ne peut étre négatif\n'999' pour quitter.\n");
scanf("%d",&recherche);
if (recherche==999)
{
@ -541,7 +533,7 @@ int affichagesolo (int tabNC[],float tabCAG[],int tabsuspension[],int *tlogique)
}
while(rechercher<0)
{
printf("ne peut étre négatif\n'999' pour quitter.");
printf("ne peut étre négatif\n'999' pour quitter.\n");
scanf("%d",&rechercher);
if (rechercher==999)
{
@ -559,6 +551,7 @@ int affichagesolo (int tabNC[],float tabCAG[],int tabsuspension[],int *tlogique)
printf("%d\t%.2f\t%d\n",tabNC[compteur],tabCAG[compteur],tabsuspension[compteur]);
return 0;
}
compteur=compteur+1;
}
printf("ce client n'existe pas\n");
return 0;

@ -3,4 +3,3 @@
272 6.50 10.000 29.99
66 33.00 11.000 22.00
345 30.00 29.000 10.00
564 38.000 20.00 17.90

@ -1,2 +1,5 @@
344 0.00 0
89 0.00 1
12 0.00 0
42 0.00 0
414 0.00 0
142 0.00 1

Loading…
Cancel
Save