Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int i, n;
- char a[100], separatori[]="*", *p;
- cin.get(a, 100);
- n=strlen(a);
- p=strtok(a, separatori);
- while(p)
- {
- cout<<p<<endl;
- p=strtok(NULL, separatori);
- }
- for(i=0; i<n; i++)
- if(a[i]==a[i+1] && a[i]!='*')
- cout<<a[i]<<a[i+1]<<endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement