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], sc[101], *cuv;
- int n;
- cin>>n;
- cin.get();
- cin.getline(s, 101);
- strcpy(sc, s);
- cuv = strtok(sc, " ");
- while (cuv)
- {
- if (strlen(cuv)>=n)
- cout<<cuv<<endl;
- cuv = strtok(NULL, " ");
- }
- cuv = strtok(s, " ");
- while (cuv)
- {
- if (strlen(cuv)<n)
- cout<<cuv<<endl;
- cuv = strtok(NULL, " ");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement