impl Display trait for Vec

38 Views Asked by At

How to implement the display trait int the below code to print just like this: 1 3 5 7 9

fn main() {
    let vec = vec![1,3,5,7,9];
    println!("{}",vec);
}

I tried several ways to simplify the input output for competitive programming for not to kill taking input output.

0

There are 0 best solutions below