Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- char c[300],cuv[300],*p,rez[300];
- int main()
- {
- cin.getline(c,255);
- p=strtok(c,"*");
- strcpy(cuv,p);
- while (p)
- {
- if (strcmp(p,cuv)!=0)
- {
- strcat(rez,p);
- }
- strcat(rez,"*");
- p=strtok(0,"*");
- }
- cout<<rez;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement