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