RosettaCodeData/Task/Loops-Continue/Rust/loops-continue.rust

11 lines
169 B
Text
Raw Permalink Normal View History

2014-04-02 16:56:35 +00:00
fn main() {
2019-09-12 10:33:56 -07:00
for i in 1..=10 {
2015-11-18 06:14:39 +00:00
print!("{}", i);
if i % 5 == 0 {
2019-09-12 10:33:56 -07:00
println!();
2015-11-18 06:14:39 +00:00
continue;
}
print!(", ");
2014-04-02 16:56:35 +00:00
}
}