Advertisement
Guest User

Untitled

a guest
Dec 9th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. #include<iostream>
  2. #include<cstring>
  3. using namespace std;
  4. int main()
  5. {
  6. char s[101],*p;
  7. int n;
  8. cin.getline(s,101);
  9. cin>>n;
  10. p=strtok(s," ");
  11. while(p!=NULL){
  12. if(n==strlen(p)) cout <<p<<endl;
  13. p=strtok(NULL," ");
  14. }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement