Cody

# Problem 26. Determine if input is odd

Solution 697657

Submitted on 8 Jul 2015 by Wello
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
%% n = 1; ans_correct = true; assert(isequal(is_it_odd(n),ans_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 1

2   Pass
%% n = 2; ans_correct = false; assert(isequal(is_it_odd(n),ans_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 1

3   Pass
%% n = 28; ans_correct = false; assert(isequal(is_it_odd(n),ans_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 1

4   Pass
%% n = 453; ans_correct = true; assert(isequal(is_it_odd(n),ans_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 1

5   Pass
%% n = 17; ans_correct = true; assert(isequal(is_it_odd(n),ans_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 1

6   Pass
%% n = 16; ans_correct = false; assert(isequal(is_it_odd(n),ans_correct))

[Warning: Function assert has the same name as a MATLAB builtin. We suggest you rename the function to avoid a potential name conflict.] ans = 1

### Community Treasure Hunt

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

Start Hunting!