Why when adding two variables does it gives you a different wired number | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Why when adding two variables does it gives you a different wired number

variable

2nd Dec 2016, 3:26 PM
PhemeloMaile
2 Answers
+ 2
Let me guess. You added 2 huge numbers and got a negative number? Don't freak out, you just went over the limit of the datatype. It's called overflow. It even made ghandi super made.
2nd Dec 2016, 5:05 PM
Yasser Kaddoura
Yasser Kaddoura - avatar
+ 1
Be specific! Post the code that is giving you a "weird" result. Otherwise we won't be able to help you.
2nd Dec 2016, 3:56 PM
Nedim Kanat
Nedim Kanat - avatar