Complete the code to print "small" when the number is less than 10.
let num = 5; match num { x if x [1] 10 => println!("small"), _ => println!("big"), }
Complete the code to print "even" when the number is even using a match guard.
let num = 8; match num { x if x [1] 2 == 0 => println!("even"), _ => println!("odd"), }
Fix the error in the match guard to correctly check if the character is a vowel.
let ch = 'a'; match ch { c if c == 'a' || c == 'e' || c == 'i' || c == 'o' || c [1] 'u' => println!("vowel"), _ => println!("consonant"), }
Fill both blanks to create a match guard that matches numbers between 1 and 5 inclusive.
let num = 3; match num { x if x [1] 1 && x [2] 5 => println!("between 1 and 5"), _ => println!("out of range"), }
Fill all three blanks to create a match guard that matches even numbers greater than 10.
let num = 12; match num { x if x [1] 2 [2] 0 && x [3] 10 => println!("even and greater than 10"), _ => println!("other"), }
