my solution was right and i tested it i m not sure what is going on
function [tf] = is_it_odd(n)
if rem(n,2)>0
tf='true';
else
tf='false';
end
end
my answer correct
good job
Test | Status | Code Input and Output |
---|---|---|
1 | Fail |
n = 1;
ans_correct = true;
assert(isequal(is_it_odd(n),ans_correct))
|
2 | Fail |
n = 2;
ans_correct = false;
assert(isequal(is_it_odd(n),ans_correct))
|
3 | Fail |
n = 28;
ans_correct = false;
assert(isequal(is_it_odd(n),ans_correct))
|
4 | Fail |
n = 453;
ans_correct = true;
assert(isequal(is_it_odd(n),ans_correct))
|
5 | Fail |
n = 17;
ans_correct = true;
assert(isequal(is_it_odd(n),ans_correct))
|
6 | Fail |
n = 16;
ans_correct = false;
assert(isequal(is_it_odd(n),ans_correct))
|
Find the sum of all the numbers of the input vector
31958 Solvers
Project Euler: Problem 6, Natural numbers, squares and sums.
1018 Solvers
Return the first and last character of a string
3453 Solvers
531 Solvers
Find out sum and carry of Binary adder
379 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!