src/main.rs aktualisiert

It´s friday agian
This commit is contained in:
robin 2024-05-10 13:43:14 +02:00
parent f2c9ebb818
commit 3edcc75e3b

View file

@ -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");
}
}
}
}