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