Cody

# Problem 2610. counting for loop

Solution 512456

Submitted on 14 Oct 2014 by Guillaume
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
%% 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'));