I hav a small app.
3 Textboxes ‘less’ ‘add’ ‘balance’
1 button ‘start’
In blocks… Bal gets valu of Add minus Less. When Add is 100 and Less is 50, I getd 50 in Bal.
But when When Add is -100 and Less is 50, I getd 150 in Bal. I must get -150. Plese help.
You need to know basic of maths
+ + Is +
- + is -
+ - is -
And - - is +
So solution is you need to know that is any number contains - then you have to - not +
Eg.
-6 -1 = -7
And again you have to check that bigger number sign is positive or negative if negative then your answer sign is negative after adding
Some math I knoe.
My ‘less’ is always minus. My ‘add’ maybe plus our minus. Here is problems. But My ‘bal’ must show corekt sign +/-. How I can do? I will post pictur of bloc tomoro if it help.
You have to check before performing any operation that bal is negative or positive
If the value is negative, the negative sign will come up. So the problem is on your blocks and basic math
OK. Som kind of ‘if’ add’ is <0 then… Ty vm. I’ll try. Gn
i sa my mistek. i chnanged minus to plus. very sily mistk. now it is corect. ty all. ty for baring me.
Then mark my this post as solution
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.