Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cstring>
- using namespace std;
- char x[110],*p,mici[110],mari[110];
- int main()
- {
- int n;
- cin>>n;
- cin.get();
- cin.getline(x,110);
- p=strtok(x," ");
- while(p!=0)
- {
- if(strlen(p)>=n)
- {
- strcat(mari,p);
- strcat(mari,"\n");
- }
- else
- {
- strcat(mici,p);
- strcat(mici,"\n");
- }
- p=strtok(0," ");
- }
- if(strlen(mari)!=0&&strlen(mici)!=0)
- {
- cout<<mari<<mici;
- }
- else
- {
- cout<<"NU EXISTA";
- }
- return 0;
- }
- pb 2 2020
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement