This problem is Restricted Addition v1 with more restrictions. Also, you must handle negative and non-integer values.
Add two numbers 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
2 Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers17
Suggested Problems
-
Return the 3n+1 sequence for n
8482 Solvers
-
Sum all integers from 1 to 2^n
17386 Solvers
-
Four quadrant inverse tangent function.
70 Solvers
-
1343 Solvers
-
Use R2016b Text Manipulations to Fix These Addresses (Part 3)
105 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!
Testing for 'e' when you only want to eliminate 'eval' is rather unfair.
That's a big part of this challenge. It's not an unintended side effect. Rather, it's a restriction designed to promote more exotic answers.