From 3edcc75e3ba10c951f765457da5f46131dd9b521 Mon Sep 17 00:00:00 2001 From: robin Date: Fri, 10 May 2024 13:43:14 +0200 Subject: [PATCH] src/main.rs aktualisiert MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It´s friday agian --- src/main.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main.rs b/src/main.rs index ccd6eed..6acaeab 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,5 +1,4 @@ use rand::Rng; - fn main() { let mut number:i128 = 0; loop { @@ -10,17 +9,15 @@ fn main() { std::io::stdin().read_line(&mut input).expect("Failed to read line"); let input: String = input.trim().parse().unwrap(); let yes:String = String::from("y"); - let no = String::from("no"); + let no = String::from("n"); if input == yes { let number = number+=rng; } else if input == no { - + println!("maby the next number"); } else { println!("Invalid input"); } - } - -} +} \ No newline at end of file