Category Archives: Sin categoría

How to determine whether input belong to a set of numbers

The easiest way is to sum up the result of the comparison between the input and the array. For example, imagine that you have an array of numbers x and you want to know if 5 is one of these numbers. You … Continue reading

Posted in Sin categoría | Tagged , | Leave a comment

How to determine whether input is integer

The easiest and fastest way to check if a variable is an integer independently of its format is to compare the input with its rounded version, for example: x==floor(x) If we are just interested in knowing if the input is an … Continue reading

Posted in Sin categoría | Tagged , , | Leave a comment