fork(1) download
  1. #include <iostream>
  2. #include <cstring>
  3. using namespace std;
  4.  
  5. const int MAX_LENGTH = 100;
  6.  
  7.  
  8. int main() {
  9. char array[MAX_LENGTH + 1], mt[MAX_LENGTH + 1][MAX_LENGTH + 1], secMt[MAX_LENGTH + 1][MAX_LENGTH + 1];
  10. int counter = 0, lengthFin = 0;
  11.  
  12.  
  13. while (cin.getline(array, MAX_LENGTH)) {
  14. int length = strlen(array);
  15. for (int j = 0; j < length; ++j) {
  16. mt[counter][j] = array[j];
  17. }
  18. lengthFin = length;
  19. ++counter;
  20. }
  21.  
  22. /*
  23.   if ((array[j] >= 'a' && array[j] <= 'z') || (array[j] >= 'A' && array[j] <= 'Z')) {
  24. mt[counter][j] = array[j];
  25. }
  26. */
  27.  
  28.  
  29.  
  30.  
  31.  
  32. for (int i = lengthFin - 1; i >= 0; --i) {
  33. for (int j = 0 ; j < lengthFin; ++j) {
  34. if ((mt[j][i] >= 'a' && mt[j][i] <= 'z') || (mt[j][i] >= 'A' && mt[j][i] <= 'Z')) {
  35. cout << mt[j][i]<< "";
  36. //mt[counter][j] = array[j];
  37. }
  38. //cout << mt[j][i]<< " ";
  39. }
  40. cout <<".\n"; //
  41.  
  42. }
  43.  
  44.  
  45. return 0;
  46. }
  47.  
  48.  
  49. /*
  50. a*c*
  51. **sd
  52. v*g*
  53. ****
  54. ==============
  55.  *****
  56. *Ulei
  57. Vi**D
  58. Pahar
  59. CANA*
  60. =======
  61. ****
  62. a*sa
  63. dd*b
  64. ***z
  65. ===========]
  66.  
  67. ****
  68. a*sa
  69. dd*b
  70. ***z
  71. */
Success #stdin #stdout 0s 5324KB
stdin
AmAmAb
Nunera
Ilarel
Mt*t*a
Ae***u
L****r
stdout
balaur.
Are.
mert.
Ana.
multe.
ANIMAL.