Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3. #include <string.h>
  4.  
  5. #define TAILLEMAX 100
  6. typedef char chaine[TAILLEMAX];
  7.  
  8. int lis_terminaux(chaine c, int i, chaine t){
  9.  
  10. }
  11.  
  12. int lis_S(chaine c, int i){
  13. int debut=i;
  14. i=lis_terminaux(c,i,"ab");
  15. if(i==-1){
  16. i=lis_terminaux(c,debut,"a");
  17. i=lis_S(c,i);
  18. i=lis_terminaux(c,i,"b");
  19. }
  20. return i;
  21. }
  22.  
  23.  
  24. int main (){
  25. chaine c;
  26. int i;
  27. scanf("%s",c);
  28. i=lis_S(c,0);
  29. if(i==strlen(c)) printf("oui\n");
  30. else printf("non\n");
  31. return 0;
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement