1 Replies - 754 Views - Last Post: 03 November 2012 - 04:41 PM Rate Topic: -----

#1 jlessard93  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 11
  • Joined: 08-October 12

Random Function in VB6

Posted 29 October 2012 - 07:30 AM

How is it possible to randomly print an even integer from 2 through 100? Does it to do with Mod I have no idea
Is This A Good Question/Topic? 0
  • +

Replies To: Random Function in VB6

#2 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 574
  • View blog
  • Posts: 2,989
  • Joined: 19-May 09

Re: Random Function in VB6

Posted 03 November 2012 - 04:41 PM

Yes, mod is part of it. If your random number mod 2 isn't 0 (i. e. if it can't be divided evenly by 2), get another one until it is.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1