Answers for "python program to add without + operator"

0

python program to add without + operator

def add_without_plus_operator(a, b):
    while b != 0:
        data = a & b
        a = a ^ b
        b = data << 1
    return a
print(add_without_plus_operator(2, 10))
print(add_without_plus_operator(-20, 10))
print(add_without_plus_operator(-10, -20))
Posted by: Guest on June-19-2021

Code answers related to "python program to add without + operator"

Browse Popular Code Answers by Language