by IRBMe (22 Submissions)
Category: Math/Dates
Compatability: VB Script
Difficulty: Beginner
Date Added: Wed 3rd February 2021
Rating: (9 Votes)
Nothing spectacular or ground breaking, but just a little piece of code I thought I would do in 20 minutes. After 'Fateha Rahman's attempts at writing this code, I felt my comments weren't really taking effect of improving their code much. So I decided to write this in 20 minutes of spare time to show how it should be done. This code shows 3 different methods of checking if a number is even or odd, and shows which is the fastest. It includes proper bench marking code with it.
Download Even or Odd? (4 KB)