How to perform addition of 2 integers without using + operator. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

How to perform addition of 2 integers without using + operator.

2nd Jun 2019, 2:50 AM
Durgesh Mishra
Durgesh Mishra - avatar
3 Answers
+ 2
which language? if Java you can use the Math class: int x = 2; int y = 6; Math.addExact(x,y);
2nd Jun 2019, 3:10 AM
Jake
Jake - avatar
+ 2
To find sum of A and B you can append A and B number of items to array which length is the sum.
2nd Jun 2019, 7:09 AM
DSG
DSG - avatar