Solution in Bash and some general commands:
#!/bin/bash noCarryAddition () { p=$(( $1 > $2 ? $1 : $2 )); eval paste '<(printf "%${#p}d" $'{1,2}' | grep -o .)' | awk '{printf $1+$2}' | awk 4 } noCarryAddition 2 11 # => 13 noCarryAddition 16 18 # => 214 noCarryAddition 122 81 # => 1103
This reminds me of the quote: "Whatever you do, there is an asian doing it better." Nice solution!!
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Solution in Bash and some general commands:
This reminds me of the quote: "Whatever you do, there is an asian doing it better."
Nice solution!!