Problem 45497. Four digit number ABCD reversal
Solution Stats
Problem Comments
-
1 Comment
Michael
on 7 May 2020
You really shouldn't give away the answer in the test suite. ;-)
You could change the test suite to something like:
assert (str2num(fliplr(num2str(y))) == y*4);
Although this also sort of gives away one possible solution.
Problem Recent Solvers41
Suggested Problems
-
How to find the position of an element in a vector without using the find function
2608 Solvers
-
Given an unsigned integer x, find the largest y by rearranging the bits in x
1341 Solvers
-
Back to basics 22 - Rotate a matrix
860 Solvers
-
Reverse the elements of an array
812 Solvers
-
514 Solvers
More from this Author2
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!