Experts Exchange connects you with the people and services you need so you can get back to work.
function TForm1.RandEven: Integer;
Result := (Random( 64000 ) + 1000);
UNtil (Result Mod 2) = 0
Open in new window
function randomeven(min, max: double): double;
var range, tmp : double;
if min > max then
tmp := min;
min := max;
max := tmp;
min := min / 2;
max := max / 2;
range := max - min;
randomeven := (min + Random * range) * 2;
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.
Premium members get this course for $159.20.
Premium members get this course for $349.00.
Premium members get this course for $151.20.
Premium members get this course for $12.50.
Premium members get this course for $62.50.