# Adding Decimals

**URL:** <https://forum.kirupa.com/t/adding-decimals/239453>\
**Category:** flash\
**Created:** [September 21, 2007, 9:24pm UTC](https://forum.kirupa.com/t/adding-decimals/239453 "2007-09-21T21:24:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![540media](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/540media/32/2543_2.png) [@540media](https://forum.kirupa.com/u/540media)\
**Post date:** [September 21, 2007, 9:24pm UTC](https://forum.kirupa.com/t/adding-decimals/239453/1 "2007-09-21T21:24:49Z")

</div>

can some one help me with this??

I’m creating a “simple” math task for some kids where they add decimals together.

I’ve created script that randomly picks two decimal numbers and then there is a text box for them to enter their answer.

The problem that I am having is that because I needed to show the .0 on some of the numbers (and flash doesnt do that - it would show 6 rather than 6.0) I’ve used script to add the .0 onto the end of the numbers that need it

The problem that I am having now is that the numbers dont add together properly (at all)

e.g.

should be … 89.9 + 5.8 = 95.7  
but when trace the answer is … 89.95.8

I’ve included a fla if someone could have a look and try and help me out??  
even if someone could come up with another way of creating the decimals so that there is never any .0 numbers

cheers
