Advertisement
cwchen

[Rust] for loop with continue

Aug 22nd, 2017
620
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.13 KB | None | 0 0
  1. fn main() {
  2.     for i in 1..11 {
  3.         if i % 2 == 0 {
  4.             continue;
  5.         }
  6.  
  7.         println!("{}", i);
  8.     }
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement