Addition eithout '+' operator | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Addition eithout '+' operator

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

31st Mar 2020, 5:05 PM
Ana
7 Answers
+ 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
31st Mar 2020, 6:17 PM
Geek
Geek - avatar
+ 1
Is i sum inbuilt method?? I mean how it works?
31st Mar 2020, 5:30 PM
Ana
+ 1
Geek .....can you please provide code using bitwise??
31st Mar 2020, 6:26 PM
Ana
+ 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
31st Mar 2020, 8:26 PM
nichdiomajadoch
+ 1
You may follow a+b=a&b +a^b bitwise :)
1st Apr 2020, 11:04 PM
Hima
Hima - avatar
+ 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
2nd Apr 2020, 11:28 AM
Bebo Hotchandani
Bebo Hotchandani - avatar