Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cstring>
- using namespace std;
- int main()
- {
- char s[101],*p;
- int n;
- cin.getline(s,101);
- cin>>n;
- p=strtok(s," ");
- while(p!=NULL){
- if(n==strlen(p)) cout <<p<<endl;
- p=strtok(NULL," ");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement