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 |
x = 100;
y_correct = 73;
assert(isequal(cowboy(x),y_correct))
x = 1000;
y_correct = 977;
assert(isequal(cowboy(x),y_correct))
x = 33;
y_correct = 3;
assert(isequal(cowboy(x),y_correct))
x = 555;
y_correct = 87;
assert(isequal(cowboy(x),y_correct))
x = 2;
y_correct = 1;
assert(isequal(cowboy(x),y_correct))
|
Test if a Number is a Palindrome without using any String Operations
181 Solvers
274 Solvers
2539 Solvers
187 Solvers
Calculate square and cube of number
248 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!