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
Post a Comment