fn test_if_else(c: i32) {
if c > 0 {
println!("The number {} is greater than zero", c);
} else if c < 0 {
println!("The number {} is less then zero", c);
} else {
println!("the number {} is equal to zero", c);
}
here's what happened to me
match c {
0 => println!("the number {} is equal to zero", c),
0..infinity => println!("The number {} is greater than zero", c),
_ => println!("the number {} is equal to zero", c)
}
but it doesn't work with 'infinity'