Created
November 12, 2015 18:40
-
-
Save benaryorg/4128656dc642dcfbff01 to your computer and use it in GitHub Desktop.
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
fn main() | |
{ | |
let v = (0..16).collect::<Vec<_>>(); | |
for p in v.iter() | |
.chain(v.iter().rev().skip(1).take(v.len()-2)) | |
.cycle() | |
.take(35) | |
{ | |
for i in (v.len()/2..).take(v.len()+v.len()/2) | |
{ | |
print!("{}",if (i%(v.len()/2))==(p%(v.len()/2)){'#'} else{' '}); | |
} | |
println!(""); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment