SHARE
TWEET

V40

Andrei_Muresan Nov 18th, 2019 93 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4. char c[300],cuv[300],*p,rez[300];
  5. int main()
  6. {
  7.     cin.getline(c,255);
  8.     p=strtok(c,"*");
  9.     strcpy(cuv,p);
  10.     while (p)
  11.     {
  12.         if (strcmp(p,cuv)!=0)
  13.         {
  14.             strcat(rez,p);
  15.         }
  16.         strcat(rez,"*");
  17.         p=strtok(0,"*");
  18.     }
  19.     cout<<rez;
  20.     return 0;
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top