Advertisement
rekkylaws

rechercherLivre - SDA-TP6

Feb 28th, 2020
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.40 KB | None | 0 0
  1. int rechercherLivre(const T_Titre rTitre, const T_Bibliotheque *ptrB)
  2. {
  3.     int cpt=0, nbIter=0;
  4.     //printf("Il y a %d livre(s) dans cette bibliothèque",ptrB->nbLivres);
  5.     while(cpt<(ptrB->nbLivres))
  6.     {
  7.         if(strcmp(ptrB->etagere[cpt].titre, rTitre)==0)
  8.         {
  9.             nbIter++;
  10.             printf("\n\t\tTITRE : %s, AUTEUR : %s", ptrB->etagere[cpt].titre, ptrB->etagere[cpt].auteur);
  11.         }
  12.         cpt++;
  13.     }
  14.     return nbIter;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement