Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fn main() {
- let char = 'c';
- let sound = match char {
- 'A' | 'a' | 'E' | 'e' | 'I' | 'i' | 'O' | 'o' | 'U' |'u' => "vowel",
- 'A' ... 'Z' | 'a' ... 'z' => "consonant",
- _ => "other"
- };
- assert_eq!(sound, "consonant");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement