Home > Software design >  Random even number between 10 and 50
Random even number between 10 and 50

Time:08-04

I have seen a few sloppy ways to accomplish this but I figure someone had a simple clean method. Just trying to generate 1 random even number between 10 and 50.

CodePudding user response:

Generate a random number between 5 and 25, then multiply it by 2.

2 * (Get-Random -Maximum 26 -Minimum 5)
  • Related