SelinD

v78s2e5

Mar 4th, 2019
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #include<iostream>
  2. #include<cstring>
  3. using namespace std;
  4. char a[101],cuv[16],rez[101],*p;
  5. int main()
  6. {
  7. int contor=0;
  8. cin.getline(a,101);
  9. cin.getline(cuv,16);
  10. p=strtok(a," ");
  11. while(p!=0)
  12. {
  13. strcat (rez,p);
  14. if(strcmp(p,cuv)==0)
  15. {
  16. strcat(rez,"?");
  17. contor++;
  18. }
  19. strcat(rez," ");
  20. p=strtok(0," ");
  21. }
  22. if(contor!=0)
  23. cout<<rez<<" ";
  24. else cout<<"NU APARE";
  25. }
Add Comment
Please, Sign In to add comment