Division

Hi

im trying to divide a big value like 9876543/100000

im getting something like 98.76543

what should i use to get the value “98” resting the decimal values

Try this: Math.Floor(9876543/100000).ToString

Let me know if this helped you.

1 Like

Hi @krishna46111,

Use Math function or else once getting the value using trim you can ignore the value

thank you siddharth it is helpful

1 Like

Just another way of doing this.
int(9876543/100000).ToString

1 Like

This will end up giving you 99 instead of 98, i think. That’s what Convert.ToInt64() did. But I’m not sure.

Edit: As per what I read, int(9876543/100000) will give you the floor value while Convert.ToInt64() ends up giving you the rounded value. So yeah. It should definitely work.