From a6b357bfefdc83e59ac356f0a6cf9999c5577c9f Mon Sep 17 00:00:00 2001 From: Marty Sluijtman Date: Thu, 21 Mar 2024 11:35:32 +0100 Subject: [PATCH] Basic featureset --- src/main.rs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index e7a11a9..48aa180 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,3 +1,14 @@ +use rand::Rng; + + fn main() { - println!("Hello, world!"); + let foods = [ "Kapsalon" + , "Pizza" + , "Lasagne" + , "Nachos" + , "Friet" + , "Durum" + ]; + let secret_num = rand::thread_rng().gen_range(0..foods.len()); + println!("{}", foods[secret_num]) }