Advertisement
edutedu

vr 21 pr5

Apr 7th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. int i, n;
  2. char a[100], separatori[]="*", *p;
  3. cin.get(a, 100);
  4. n=strlen(a);
  5. p=strtok(a, separatori);
  6. while(p)
  7. {
  8. cout<<p<<endl;
  9. p=strtok(NULL, separatori);
  10. }
  11. for(i=0; i<n; i++)
  12. if(a[i]==a[i+1] && a[i]!='*')
  13. cout<<a[i]<<a[i+1]<<endl;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement