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.

11 lines
207 B

  1. fn main() {
  2. let mut num=5 ;
  3. loop { // instruction de boucle
  4. println ! ("Cela dure {} secondes", num ) ;
  5. if num == 8 {
  6. break ; // instruction d'interruption
  7. }
  8. num=num+1 ;
  9. }
  10. }