Des exemples de code pour programmer en Rust
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
164 B

  1. fn main(){
  2. let num = 3 ;
  3. match num {
  4. 1 => println ! ("un"),
  5. 2 | 3 => println ! ("deux ou trois"), // motifs multiples
  6. _ => println ! ("autres"),
  7. }
  8. }