File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ // Create an array with at least 100 elements in it where the ??? is.
2+ // Scroll down for hints!
3+
4+ fn main() {
5+ let a = ???
6+
7+ if a.len() >= 100 {
8+ println!("Wow, that's a big array!");
9+ } else {
10+ println!("Meh, I eat arrays like that for breakfast.");
11+ }
12+ }
13+
14+
15+
16+
17+
18+
19+
20+
21+
22+
23+
24+
25+
26+
27+
28+
29+
30+
31+
32+
33+
34+
35+
36+
37+
38+
39+
40+ // There's a shorthand to initialize Arrays with a certain size that does not
41+ // require you to type in 100 items (but you certainly can if you want!)
42+ // Check out the Primitive Types -> Arrays section of the book:
43+ // http://doc.rust-lang.org/stable/book/primitive-types.html#arrays
44+ // Bonus: what are some other things you could have that would return true
45+ // for ` a.len() >= 100 ` ?
You canβt perform that action at this time.
0 commit comments