Created
April 23, 2019 05:23
-
-
Save rust-play/2f4247cce87d94b46092c4a58b9af4a2 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const A: i32 = 23; | |
const B: i32 = 16; | |
const C: i32 = 43; | |
fn main() { | |
match 23 { | |
A => println!("Input is equal to A"), | |
B => println!("Input is equal to B"), | |
C => println!("Input is equal to C"), | |
_ => println!("Input does not equal any value"), | |
} | |
match 42 { | |
A => println!("Input is equal to A"), | |
B => println!("Input is equal to B"), | |
C => println!("Input is equal to C"), | |
_ => println!("Input does not equal any value"), | |
} | |
match 16 { | |
A => println!("Input is equal to A"), | |
B => println!("Input is equal to B"), | |
C => println!("Input is equal to C"), | |
_ => println!("Input does not equal any value"), | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment