Skip to content

Commit

Permalink
add_binary
Browse files Browse the repository at this point in the history
  • Loading branch information
a-abdellatif98 committed Jun 9, 2022
1 parent 177060c commit 702716b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Add_Binary.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ def add_binary(a, b)
return (a.to_i(2) + b.to_i(2)).to_s(2)
end

puts add_binary(11,1)
puts add_binary("11","1")

0 comments on commit 702716b

Please sign in to comment.