Last active
October 16, 2024 19:54
-
-
Save dacr/bc5260541c9209b8a88de395bb8578a4 to your computer and use it in GitHub Desktop.
hello rust loops / published by https://github.com/dacr/code-examples-manager #08b29534-8ae4-42f8-8ada-dd024d2e6e0f/b66d79c7111ea503d66817716f3d9df4c47e828a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env rust-script | |
// summary : hello rust loops | |
// keywords : rust, loops, @testable | |
// publish : gist | |
// authors : David Crosson | |
// license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2) | |
// id : 08b29534-8ae4-42f8-8ada-dd024d2e6e0f | |
// created-on : 2024-10-12T23:06:44+02:00 | |
// managed-by : https://github.com/dacr/code-examples-manager | |
// run-with : ./$file | |
fn main() { | |
let mut i = 0; | |
loop { | |
println!("bad trip hello: {}", i); | |
i += 1; | |
if i > 5 { | |
break; | |
} | |
}; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment