Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- char cuv[11001][1001];
- int main()
- {
- char s[1001],separator[]=" ";
- int N;
- cin>>N;
- for(int i=0;i<=N;++i)
- {
- cin.getline(s,1001);
- char *p;
- p=s;
- p=strtok(p,separator);
- int n=0;
- while(p)
- strcpy(cuv[n*11+i],p),++n,p=strtok(NULL,separator);
- }
- for(int i=0;i<11001;++i)
- if(strcmp(cuv[i],""))
- cout<<cuv[i]<<' ';
- cout<<'\n';
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement