src/main.rs aktualisiert
It´s friday agian
This commit is contained in:
parent
f2c9ebb818
commit
3edcc75e3b
|
@ -1,5 +1,4 @@
|
||||||
use rand::Rng;
|
use rand::Rng;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let mut number:i128 = 0;
|
let mut number:i128 = 0;
|
||||||
loop {
|
loop {
|
||||||
|
@ -10,17 +9,15 @@ fn main() {
|
||||||
std::io::stdin().read_line(&mut input).expect("Failed to read line");
|
std::io::stdin().read_line(&mut input).expect("Failed to read line");
|
||||||
let input: String = input.trim().parse().unwrap();
|
let input: String = input.trim().parse().unwrap();
|
||||||
let yes:String = String::from("y");
|
let yes:String = String::from("y");
|
||||||
let no = String::from("no");
|
let no = String::from("n");
|
||||||
if input == yes {
|
if input == yes {
|
||||||
let number = number+=rng;
|
let number = number+=rng;
|
||||||
}
|
}
|
||||||
else if input == no {
|
else if input == no {
|
||||||
|
println!("maby the next number");
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
println!("Invalid input");
|
println!("Invalid input");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in a new issue