HI, I want to calculate numbers which are in textboxe1,textbox2,textbox3 and show the result after calculation in a label how to do please reply also in textbox2 i want numbers to be in percentage how could it be done.thanks in advance
I changed your title. It should be short and not the same as your post.
What calculation do you want to do?
Hello slao
You don't tell us what the calculation should be - how about writing an example?
Sir,
thank you for support,
I am making a calculation app and stuck with mathematics
here are examples which are of excel formulas
how can i show a textbox value to be a percentage value
i want calculated value to be shown on label 1 and formula is note: a is in percentage, (axb)+c and another one is ax100/b/100,another is (a-b)-c
http://ai2.appinventor.mit.edu/reference/blocks/math.html
If you want to display one of your numbers as a percentage in a textbox, you will need to do some text manipulation. You will need to reverse this when you want the value back for a calculation
Something like
hello again,
how will i write below examples
(b3xb2)+b17,
(a4-a3)-b1,
a25x100/a4/100
also what is that blue block above is called inb middle and what is places ?
Show your blocks - so what you have tried so far.
And also post a small test aia.
I would recommend you to read the documentation and do some research before you ask.
http://ai2.appinventor.mit.edu/reference/blocks/math.html#format
I see you have 9 input text boxes, corresponding to cells B2 ...B9, in orange.
Go down your Designer text box components, and rename them nicely, like
txbProductCostWithoutTax for cell B2, then in the Blocks Editor create a value procedure B2
that retrieves txbProductCostWithoutTax.Text as its return value.
Do that for cells B2 ...B10.
After those have all been done, continue on to code procedures B12 through B21 using math blocks and calls to the earlier procedures.
After that is all working, you can go back and rename procedures B12 through B21 to match their names in column 1, or assign their values into appropriately named Labels.Text
Thanks for responding,
But problem is in multiple operator used eg; (axb)+18% etc...can u show me how to do it I've searched for it but no answer found on this topic
These should get you started.
formulas.aia (2.5 KB)
Use the blue mutator button to add sockets.
https://appinventor.mit.edu/explore/ai2/support/concepts/mutators
P.S.
There is a right click option on most blocks to switch it to external input, which shows nesting better than those internal sockets.
Formatting a fractional number to 2 places is typically done with dollars and cents in the US.
How do you show fractional amounts of money in your country?
taxcalculator.aia (165.6 KB)
i did it today but the answers are coming different i think B3,B5,B10 values are not in percentage it should be in percentage thats why result is wrong also decimal is not coming ex:2459 instead of 24.59
please look in the aia file i attached also how can i send excel file to you so can see te actual result
one thing is you have in b15 block put 0.18 will it be 18 or 0.18
Sir select calculator screen in drop-down there you find design and blocks
Try this one and post at least one or two examples (screenshots) of the results and what the results should be: taxcalculator2.aia (167.4 KB)