rustlings/exercises/primitive_types/primitive_types3.rs

14 lines
401 B
Rust
Raw Normal View History

2018-02-22 00:09:53 -06:00
// primitive_types3.rs
// Create an array with at least 100 elements in it where the ??? is.
2022-07-12 07:54:12 -05:00
// Execute `rustlings hint primitive_types3` or use the `hint` watch subcommand for a hint.
fn main() {
2023-02-16 11:31:18 -06:00
let a = ["Multiplicado cien veces"; 100];
if a.len() >= 100 {
println!("Wow, that's a big array!");
} else {
println!("Meh, I eat arrays like that for breakfast.");
}
}