for loops in rust
for x in 0..10 {
println!("{}", x); // x: i32
}
//abstract:
for var in expression {
code
}
for loops in rust
for x in 0..10 {
println!("{}", x); // x: i32
}
//abstract:
for var in expression {
code
}
loop in rust
#![allow(unused_variables)]
fn main() {
let mut x = 5; // mut x: i32
let mut done = false; // mut done: bool
while !done {
x += x - 3;
println!("{}", x);
if x % 5 == 0 {
done = true;
}
}
}
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us