Problem 45265. Restricted Addition v4
Add two inputs without use of common arithmetic operations. Unfortunately, in order to enforce this restriction, other restrictions are imposed. For example, use of 'e' is restricted to prevent use of 'eval' functions.
Until the Cody test system is changed, the hack below will work (as it currently does on every Cody problem). However, this type of solution is not appreciated.
function ans = fileread(~), ''
Other hacks are appreciated. If you can circumvent the restrictions (with your code running when called by tests 2, 3, ...) to use addition, then you have a valid and welcomed solution.
This version of the problem does not require hacks at all, just some basic MATLAB creativity!
See also:
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers8
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15341 Solvers
-
1944 Solvers
-
Determine if a Given Number is a Triangle Number
366 Solvers
-
Create a cell array out of a struct
1603 Solvers
-
Project Euler: Problem 16, Sums of Digits of Powers of Two
134 Solvers
More from this Author9
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!