From 0e852e9c813956b7ad514ca1abc10db30569ca02 Mon Sep 17 00:00:00 2001 From: Steve Phillips Date: Wed, 20 Nov 2019 06:58:24 -0800 Subject: [PATCH] examples: add random_ips.v --- examples/random_ips.v | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 examples/random_ips.v diff --git a/examples/random_ips.v b/examples/random_ips.v new file mode 100644 index 0000000000..7fb694541a --- /dev/null +++ b/examples/random_ips.v @@ -0,0 +1,10 @@ +import rand +import time + +fn main() { + rand.seed(time.now().uni) + + for _ in 0..10 { + println('${rand.next(255)}.${rand.next(255)}.${rand.next(255)}.${rand.next(255)}') + } +}