+ 1

Help me to correct the algorithm of transforming matrix

https://code.sololearn.com/cB5vj7wpT0qJ/?ref=app

21st Dec 2018, 1:44 PM
Sabina Nikolaeva
Sabina Nikolaeva - avatar
5 Respostas
+ 6
Your program outputs the following. Not knowing what output you expected, I can't help. 0 -2 -4 -6 -8 -10 -12 -14 -16 -18 -20 1 0 -1 -2 -3 -4 -5 -6 -7 -8 -9 2 2 2 2 2 2 2 2 2 2 2 3 4 5 6 7 8 9 10 11 12 13 4 6 8 10 12 14 16 18 20 22 24 5 8 11 14 17 20 23 26 29 32 35 6 10 14 18 22 26 30 34 38 42 46 7 12 17 22 27 32 37 42 47 52 57 8 14 20 26 32 38 44 50 56 62 68 9 16 23 30 37 44 51 58 65 72 79 10 18 26 34 42 50 58 66 74 82 90 0 -2 -4 -6 -8 1 0 -1 -2 -3 2 2 2 2 2 3 4 5 6 7 4 6 8 10 12 90 102 122 111 111 131 120 120 120 140 129 129 129 129 149 138 138 138 138 138 158 147 147 147 147 147 147 167 156 156 156 156 156 156 156 176 165 165 165 165 165 165 165 165 185 174 174 174 174 174 174 174 174 174 194 183 183 183 183 183 183 183 183 183 183 203 165 165 165 167 169 171 173 175 177 179 181 203 147 147 147 147 147 147 147 147 147 147 147 147 147 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356242 6356258 6356258 6356258 6356258 6356258 6356258 6356258 6356258 6356258 Process returned -1073741819 (0xC0000005) execution time : 2.005 s Press any key to continue.
22nd Dec 2018, 8:07 PM
John Wells
John Wells - avatar
22nd Dec 2018, 3:07 PM
✳AsterisK✳
✳AsterisK✳ - avatar
+ 3
j
23rd Dec 2018, 11:25 PM
Jeannot Richecarde
Jeannot Richecarde - avatar
23rd Dec 2018, 11:25 AM
Sabina Nikolaeva
Sabina Nikolaeva - avatar
0
Firstly, after transforming B[11][11] should be: 90 81 72 63 54 45 36 27 30 36 42 84 94 85 76 67 60 49 40 36 42 36 78 88 98 89 80 71 62 53 44 36 30 72 82 92 102 93 84 75 66 44 30 25 66 76 86 96 106 97 88 66 44 25 20 60 70 80 90 100 110 88 66 44 22 16 54 64 74 85 94 91 88 66 44 22 12 48 58 68 78 75 72 69 66 44 22 9 42 52 62 72 56 53 50 47 33 22 6 36 46 43 44 37 34 31 28 25 22 3 30 36 30 25 20 16 12 9 6 3 90 Secondly, after transforming upper left coner of B[11][11] should be: 90 81 72 63 54 -10 -12 -14 -16 -18 -20 84 94 85 76 67 -4 -5 -6 -7 -8 -9 78 88 98 89 80 2 2 2 2 2 2 72 82 92 102 93 8 9 10 11 12 13 66 76 86 96 106 14 16 18 20 22 24 5 8 11 14 17 20 23 26 29 32 35 6 10 14 18 22 26 30 34 38 42 46 7 12 17 22 27 32 37 42 47 52 57 8 14 20 26 32 38 44 50 56 56 68 9 16 23 30 37 44 51 58 65 72 79 10 18 26 34 42 50 58 66 74 82 90 Thirdly, after transforming C[5][5]should be: 12 9 6 9 12 12 16 13 12 9 12 16 20 10 6 12 16 13 10 3 12 9 6 3 12
23rd Dec 2018, 11:21 AM
Sabina Nikolaeva
Sabina Nikolaeva - avatar