fork download
  1. #include <iostream>
  2. #include<string.h>
  3. #include<math.h>
  4. using namespace std;
  5.  
  6.  
  7. int main()
  8. {
  9. //cout << "Hello World!" << endl;
  10. string s,s1,a[10][10],temp;
  11. int row=0,col=0,col1=0;
  12.  
  13. while(getline(cin,s))
  14. {
  15.  
  16. for(int i=0;i<s.size();i++)
  17. {
  18. temp="";
  19. while(s.at(i)!=' ')
  20. { cout<<"yolo";
  21. temp+=s.at(i);
  22. i++;
  23. if(i>s.size())
  24. break;
  25. }
  26. cout<<" ";
  27. a[row][col]=temp;
  28. col++;
  29. col1++;
  30.  
  31. }
  32. row++;
  33. col=0;
  34. }
  35.  
  36. col=col1/row;
  37. for(int i=0;i<row;i++)
  38. for(int j=0;j<col;j++)
  39. {
  40. cout<<a[i][j]<<" ";
  41. }
  42.  
  43.  
  44.  
  45. return 0;
  46. }
Runtime error #stdin #stdout 0s 3344KB
stdin
Standard input is empty
stdout
Standard output is empty