Created
December 6, 2021 13:57
-
-
Save wperron/53c156582cac019436c085e7e1de32cc to your computer and use it in GitHub Desktop.
Calculate the area of a rectagular prism
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() { | |
println!("{:?}", wrap(2, 3, 4)); | |
} | |
fn wrap(l: i32, w: i32, h: i32) -> i32 { | |
2 * (l*w + w*h + h*l) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment