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