Merge pull request #18 from akshitgautam42/Ex-19

Exercise 19
This commit is contained in:
Akshit Gautam 2023-11-12 12:13:53 +05:30 committed by GitHub
commit 02c5ad1e34
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,10 +5,11 @@
// Execute `rustlings hint primitive_types3` or use the `hint` watch subcommand
// for a hint.
// I AM NOT DONE
fn main() {
let a = ???
// let a = [0; 100];
let a : [i32;100] = (0..100).collect::<Vec<i32>>().try_into().unwrap_or_else(|v : Vec<i32>| panic!("Expected a vec length of {} but it was {}",100,v.len()));
if a.len() >= 100 {
println!("Wow, that's a big array!");