Advertisement
cwchen

[Rust] for equivalent in while

Aug 22nd, 2017
620
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Rust 0.10 KB | None | 0 0
  1. fn main() {
  2.     let mut i = 1;
  3.     while i < 10 {
  4.         println!("{}", i);
  5.         i += 2;
  6.     }
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement