Jump to content
Sign in to follow this  
spyrorocks

adding decimals

Recommended Posts

spyrorocks

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
Paulie

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
Valuater

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
buzz44

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

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

Like that?


qq

Share this post


Link to post
Share on other sites
Paulie

Copycat... :P

Share this post


Link to post
Share on other sites
buzz44

$Number = 232

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

Fixed syntax error + simplified Paulie :P.

Edited by Burrup

qq

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  

×