-
May 16th, 2011, 04:23 PM
#1
need help with building a function
Hello folks,
I have a task that I cannot solve, maybe you guys can help me out .
To explain it I'll start with an example.
1234=46
2222=8
These equations are false, but if you add plusses between the digits you can make them be true, like this:
12+34=46
2+2+2+2=8
You need to build a function that gets 2 numbers (the left side and the right side of the equation), puts the plusses in right places between the digits of the left number, and then returns the equation in it's true form.
It is important to notice that there can be a random number of plusses.
That's it, have any idea?
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|