Constraint to generate values divisible by 5 in ascending order

In reply to Radheychin:

You’re constraining your randomisation to:

  1. Numbers divisible by 5
  2. Print in ascending order

You constrained the ascending order part but divisibility of 5 is not. Add that and you’d be fine, something like, foreach (var1[i]) var1[i] % 5 == 0.

Hope it helps… Cheers.