Advertisement
a53

AfisSimetric

a53
Dec 13th, 2018
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4. char cuv[11001][1001];
  5.  
  6. int main()
  7. {
  8. char s[1001],separator[]=" ";
  9. int N;
  10. cin>>N;
  11. for(int i=0;i<=N;++i)
  12. {
  13. cin.getline(s,1001);
  14. char *p;
  15. p=s;
  16. p=strtok(p,separator);
  17. int n=0;
  18. while(p)
  19. strcpy(cuv[n*11+i],p),++n,p=strtok(NULL,separator);
  20. }
  21. for(int i=0;i<11001;++i)
  22. if(strcmp(cuv[i],""))
  23. cout<<cuv[i]<<' ';
  24. cout<<'\n';
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement