Created
December 8, 2017 11:20
-
-
Save goofmint/6aae9a61987322be42fcd4824a1c0256 to your computer and use it in GitHub Desktop.
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
#[no_mangle] | |
pub fn sum(a: i32) -> i32 { | |
let mut total = 0; | |
for x in 0..a { | |
total += x; | |
for y in 0..a { | |
total += y; | |
} | |
} | |
total | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment