Advertisement
Guest User

Untitled

a guest
May 1st, 2016
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.39 KB | None | 0 0
  1. int image_aux(Lien l, int x)
  2. {
  3.     if (l->x != x) image_aux(l->suiv,x);
  4.    
  5.     return l->y;
  6. }
  7.  
  8. int image(Appli app, int x)
  9. {
  10.     if(!element(app->A, x))
  11.     {
  12.         fprintf(stderr,"%d ne fait pas partie de l'ensemble de départ.", x);
  13.         exit(1);
  14.     }
  15.    
  16.     if (app->l->x == x)
  17.     {
  18.         printf("L'image de %d est %d\n", x, app->l->y);
  19.     }
  20.     else
  21.     {
  22.         image_aux(app->l->suiv, x);
  23.     }
  24.     return app->l->y;
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement