How to check the remainder has a rounded value or not, can any one help me out this

I have a case to handle remainder is rounded number or not?
for example, if case1:
m=3, QR=5
QR/MOQ,5/3=1.6667… remainder is not rounded value

case2: QR=6,m=3
6/3=2, the remainder have rounded
what is the logic to do this
@THIRU_NANI @Palaniyappan @Gangadhar_Athili

Hey!

Check this out

Regards,
NaNi

I don’t want to round that number, just bot need to check that is rounded or not,if rounded then it go true else go to false

Hi!

Yeah, Got it

in If Condition Do Like this

InputText.Contains(".")

Then part->
Else Part->

Regards,
NaNi

Hi @saritha_panguluri ,

For quotients, with values such as 2.00, 3.00, we might get the wrong output.

Maybe calculating the remainder of the resultant value when divided by 1 would be a better option.

1. m=3, QR=5
 = QR/MOQ
result = 5/3 =1.6667…

((result mod 1) == 0)  //Returns false as the value contains decimals.

2. m=3, QR=6
 = QR/MOQ
result = 6/3 = 2.00    

((result mod 1) == 0)  //Returns true as there are no decimal values.
1 Like

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