Created
July 16, 2019 20:15
-
-
Save rust-play/131ddc6dd4d66d4c3b734cae28e48822 to your computer and use it in GitHub Desktop.
Code shared from the Rust Playground
This file contains 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
#![allow(unused)] | |
fn main() { | |
let input = vec![vec![8, 7, 9], vec![6, 7, 6], vec![3, 2, 5]]; | |
for (i, row) in input.iter().enumerate(){ | |
let max = row.iter().max(); | |
println!("\ni = {}", i); | |
println!("row = {:?}", row); | |
println!("max = {:?}\n", max); | |
for (j, col) in row.iter().enumerate() { | |
println!("\tj = {}", j); | |
println!("\tval = {}", val); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment