Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #define TAILLEMAX 100
- typedef char chaine[TAILLEMAX];
- int lis_terminaux(chaine c, int i, chaine t){
- }
- int lis_S(chaine c, int i){
- int debut=i;
- i=lis_terminaux(c,i,"ab");
- if(i==-1){
- i=lis_terminaux(c,debut,"a");
- i=lis_S(c,i);
- i=lis_terminaux(c,i,"b");
- }
- return i;
- }
- int main (){
- chaine c;
- int i;
- scanf("%s",c);
- i=lis_S(c,0);
- if(i==strlen(c)) printf("oui\n");
- else printf("non\n");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement