I really don't see the point of that kind of problems where you can't use Matlab built-in functions.
which functions?
Sum all integers from 1 to 2^n
8427 Solvers
Test if two numbers have the same digits
187 Solvers
MATCH THE STRINGS (2 CHAR) very easy
250 Solvers
5027 Solvers
526 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!