fn main(){ let mut a = [1,2,3,4,5]; a_mul(&mut a); println!("{:?}",a); fn a_mul(p: &mut [i32;5]){ let mut i = 0; while i<p.len() { p[i] *= 3; i += 1; } } }
To embed this project on your website, copy the following code and paste it into your website's HTML: