Cody

# Problem 2161. Let's get back to school, and create multiplication tables

Solution 2488646

Submitted on 7 Jun 2020 by Ramesh Kumar V
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

### Test Suite

Test Status Code Input and Output
1   Pass
start = 1; endno = 10; y_correct = [1 2 3 4 5 6 7 8 9 10; 2 4 6 8 10 12 14 16 18 20; 3 6 9 12 15 18 21 24 27 30; 4 8 12 16 20 24 28 32 36 40; 5 10 15 20 25 30 35 40 45 50; 6 12 18 24 30 36 42 48 54 60; 7 14 21 28 35 42 49 56 63 70; 8 16 24 32 40 48 56 64 72 80; 9 18 27 36 45 54 63 72 81 90; 10 20 30 40 50 60 70 80 90 100;]; assert(isequal(Tables(start, endno),y_correct))

t = [] t = 1 2 3 4 5 6 7 8 9 10 t = 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 t = 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 t = 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 4 8 12 16 20 24 28 32 36 40 t = 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 t = 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 6 12 18 24 30 36 42 48 54 60 t = 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 6 12 18 24 30 36 42 48 54 60 7 14 21 28 35 42 49 56 63 70 t = 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 6 12 18 24 30 36 42 48 54 60 7 14 21 28 35 42 49 56 63 70 8 16 24 32 40 48 56 64 72 80 t = 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 6 12 18 24 30 36 42 48 54 60 7 14 21 28 35 42 49 56 63 70 8 16 24 32 40 48 56 64 72 80 9 18 27 36 45 54 63 72 81 90 t = 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 6 12 18 24 30 36 42 48 54 60 7 14 21 28 35 42 49 56 63 70 8 16 24 32 40 48 56 64 72 80 9 18 27 36 45 54 63 72 81 90 10 20 30 40 50 60 70 80 90 100 table = 1 2 3 4 5 6 7 8 9 10 2 4 6 8 10 12 14 16 18 20 3 6 9 12 15 18 21 24 27 30 4 8 12 16 20 24 28 32 36 40 5 10 15 20 25 30 35 40 45 50 6 12 18 24 30 36 42 48 54 60 7 14 21 28 35 42 49 56 63 70 8 16 24 32 40 48 56 64 72 80 9 18 27 36 45 54 63 72 81 90 10 20 30 40 50 60 70 80 90 100

2   Pass
start = 17; endno = 19; y_correct = [17 18 19; 34 36 38; 51 54 57; 68 72 76; 85 90 95; 102 108 114; 119 126 133; 136 144 152; 153 162 171; 170 180 190;]; assert(isequal(Tables(start, endno),y_correct))

t = [] t = 17 18 19 t = 17 18 19 34 36 38 t = 17 18 19 34 36 38 51 54 57 t = 17 18 19 34 36 38 51 54 57 68 72 76 t = 17 18 19 34 36 38 51 54 57 68 72 76 85 90 95 t = 17 18 19 34 36 38 51 54 57 68 72 76 85 90 95 102 108 114 t = 17 18 19 34 36 38 51 54 57 68 72 76 85 90 95 102 108 114 119 126 133 t = 17 18 19 34 36 38 51 54 57 68 72 76 85 90 95 102 108 114 119 126 133 136 144 152 t = 17 18 19 34 36 38 51 54 57 68 72 76 85 90 95 102 108 114 119 126 133 136 144 152 153 162 171 t = 17 18 19 34 36 38 51 54 57 68 72 76 85 90 95 102 108 114 119 126 133 136 144 152 153 162 171 170 180 190 table = 17 18 19 34 36 38 51 54 57 68 72 76 85 90 95 102 108 114 119 126 133 136 144 152 153 162 171 170 180 190

3   Pass
start = 21; endno = 22; y_correct =[21 22; 42 44; 63 66; 84 88; 105 110; 126 132; 147 154; 168 176; 189 198; 210 220;] assert(isequal(Tables(start, endno),y_correct))

y_correct = 21 22 42 44 63 66 84 88 105 110 126 132 147 154 168 176 189 198 210 220 t = [] t = 21 22 t = 21 22 42 44 t = 21 22 42 44 63 66 t = 21 22 42 44 63 66 84 88 t = 21 22 42 44 63 66 84 88 105 110 t = 21 22 42 44 63 66 84 88 105 110 126 132 t = 21 22 42 44 63 66 84 88 105 110 126 132 147 154 t = 21 22 42 44 63 66 84 88 105 110 126 132 147 154 168 176 t = 21 22 42 44 63 66 84 88 105 110 126 132 147 154 168 176 189 198 t = 21 22 42 44 63 66 84 88 105 110 126 132 147 154 168 176 189 198 210 220 table = 21 22 42 44 63 66 84 88 105 110 126 132 147 154 168 176 189 198 210 220

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!