 # How to find the rest number from a calculation

Hello I wonder how i can find the rest number after a calculation.
Example number A = 3000 and Number B= 2000 then when u take 3000 - 2000 = 1000
I want to assign that rest number to a variable. How can i do it ?

1 Like

well,
use Assign activity like this
restNumber = Cint(A)-Cint(B)

Cheers
@langsem

4 Likes

uhm fast question, When i do this i get a BIG number

how can i convert it to a double from a string ? the number its 1650,00

I am currenrly using convert.todouble(var)
but then i get 165000

1 Like

Var.toString

no the variable its alrdy a string, but i need to convert it to a double

1 Like

DoubleVar = Double.Parse(StrVar)

hm still get 165000 :S

1 Like

so you need like 1650,00 instead of 165000

Indeed. The value its got from a get text activity that spits out “1650,00” as a string. I am then using that value to find the rest number comparing to another value ( thats a double ) So i would need to convert that string into a double to be able to perform the math

1 Like

okay Got it, you can go through this post

Cheers

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.