Sign in to follow this  
Followers 0
spyrorocks

adding decimals

7 posts in this topic

ok, lets say i have a number like this: 376

the 3 is the dollars, and the 76 are the cents. is there an autoit function that can stick the decimal in there for me?

thanks help appriciated!

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

ok, lets say i have a number like this: 376

the 3 is the dollars, and the 76 are the cents. is there an autoit function that can stick the decimal in there for me?

thanks help appriciated!

yea

$number1 = Inputbox("Decimal adder", "Place number below")

If Int($number1) then msgbox(0,"New","With decimal you have: " $number1/100)

Like that?

Edited by Paulie

Share this post


Link to post
Share on other sites

you know this was easy

$num = StringSplit("376", "")
$dollars = ""
For $x = 1 to $num[0]
    $dollars = $dollars & $num[$x]
    If $x = 2 Then $dollars = $dollars & "."
Next
    
MsgBox(64, "Monies are ", "$" & $dollars)

8)


NEWHeader1.png

Share this post


Link to post
Share on other sites

Copycat... :P

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

$Number = 232

MsgBox(0, "Result", $Number / 100)

Fixed syntax error + simplified Paulie :P.

Edited by Burrup

[u]Old Projects:[/u]A3MORGB2Hex[u]Old Functions:[/u]_TimeAdd/_TimeSub_AddComma_BubbleSort _RippleSort "He who does not understand your silence will probably not understand your words." - Elbert Hubbard.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0