Rounding to specific Integers

Hello guys,
I need to round integers to specific integers which I have before. for example The integers which I want as output are 120 , 250 , 300 only and the integers are input could be 117 , 246 , 299 or 122,255,307 or anything else so rounding here could not up only or down only.

Hi @hossam.amer666

Use Math.Round:

2 Likes

Thanks man, I really appreciate your efforts

In the case that your allowable values can’t be conveniently rounded to, you can also just look for the closest value.

1 Like

yes this exactly what I was trying to do, Thank man