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