c# - Check if variable values are close to each other -


Assume that we find two variables:

  int test = 50; Int test1 = 45;  

Now I have to check that if within test1 the value is within 5 / +5 in the test . How can I do this?

Looks like you just want to check that the difference between two numbers is within a certain limit .

  // Get the difference difference test = test1; // If the range (-5>  

Comments

Popular posts from this blog

c# - Reactive Extensions ControlScheduler -

scala - Play Framework - how to bind form to a session field -

javascript - Enable/Disable form elements and changing the values of button at a time? -