This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.
Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
global gRV;
gRV = [];
N = 10;
gRV_correct = [3 5 7 9];
counting_loop(N);
code = textread('counting_loop.m', '%s');
assert(isequal(gRV, gRV_correct) && strcmp(code(5), 'for'));
|
2 | Pass |
global gRV;
gRV = [];
N = 5;
gRV_correct = [3 5];
counting_loop(N);
code = textread('counting_loop.m', '%s');
assert(isequal(gRV, gRV_correct) && strcmp(code(5), 'for'));
|
3 | Pass |
global gRV;
gRV = [];
N = 3;
gRV_correct = [3];
counting_loop(N);
code = textread('counting_loop.m', '%s');
assert(isequal(gRV, gRV_correct) && strcmp(code(5), 'for'));
|
4 | Pass |
global gRV;
gRV = [];
N = 0;
gRV_correct = [];
counting_loop(N);
code = textread('counting_loop.m', '%s');
assert(isequal(gRV, gRV_correct) && strcmp(code(5), 'for'));
|
5 | Pass |
global gRV;
gRV = [];
N = 39;
gRV_correct = [3 5 7 9 11 13 15 17 19 21 23 25 27 29 31 33 35 37 39];
counting_loop(N);
code = textread('counting_loop.m', '%s');
assert(isequal(gRV, gRV_correct) && strcmp(code(5), 'for'));
|
Given a 4x4 matrix, swap the two middle columns
301 Solvers
304 Solvers
Relative ratio of "1" in binary number
153 Solvers
344 Solvers
303 Solvers