1
0
Fork 0
mirror of https://github.com/rust-lang/rustlings.git synced 2024-05-03 22:27:30 +02:00

Merge pull request #410 from tsauvajon/fix-option1

fix(option1): Don't add only zeros to the numbers array
This commit is contained in:
fmoko 2020-05-29 00:33:00 +02:00 committed by GitHub
commit 918f310674
Signed by: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -15,7 +15,7 @@ fn main() {
let mut numbers: [Option<u16>; 5];
for iter in 0..5 {
let number_to_add: u16 = {
((iter * 5) + 2) / (4 * 16)
((iter * 1235) + 2) / (4 * 16)
};
numbers[iter as usize] = number_to_add;