+1

Addition eithout '+' operator

Is it possible to add two integers without using '+' operator in the whole code? If yes the how?

3/31/2020 5:05:53 PM

Ana

7 Answers

New Answer

+2

Sum is a inbuilt method which is used to add the integers in the list. You can do addition using bitwise operator without using any built in function

+1

Is i sum inbuilt method?? I mean how it works?

+1

Geek .....can you please provide code using bitwise??

+1

Refer this https://www.geeksforgeeks.org/add-two-numbers-without-using-arithmetic-operators/amp/ https://www.geeksforgeeks.org/how-to-sum-two-integers-without-using-arithmetic-operators-in-cc/amp/?ref=rp

+1

No Operator a=4 b=5 for I in range(a): for j in range(b,highest possible): If j > b: b=j break

+1

You may follow a+b=a&b +a^b bitwise :)

+1

Use the multipy operator to and odd and even operators to add or subtract Or use the the variable methods to imply it on the program to get the addition and subtraction