in

Even numbers are so hard

Even numbers are so hard | web-memes, try-memes, string-memes, IT-memes, twitter-memes, retweet-memes, private-memes | ProgrammerHumor.io
web-memes, try-memes, string-memes, IT-memes, twitter-memes, retweet-memes, private-memes | ProgrammerHumor.io

Content

K Jul 30, 2020 God I wish there was an easier way to do this private bool IsEven (int number) if (number 1) return false; else if (number 2) return true; else if (number 3) return false; else if (number 4) return true; else if (number 5) return false; else if (number 6) return true; else if (number 7) return false; else if (number 8) return true; else if (number 9) return false; else if (number 10) return true; else if (number 11) return false; else if (number 12) return true; 17 15.1K 69K K Jul 30, 2020 I figured it out! Thanks everyone private bool IsEven(int number) string numberstring number. Tostring(); string lastChar numberString. Substring(numberString. Length – 1); if (lastChar lastChan I lastChar lastChar I lastChar return true: return false; 9 347 17. 1.7K M 22.8K K Replying to Why are people talking about ? I’m trying to determine parity not get percentages 1:08 AM Jul 30, 2020 Twitter Web App 443 Retweets 162 Quote Tweets 14.4K Likes