How to use the same arguments in println multiple times with Rust

1 Answer

0 votes
fn main() {
    println!("A: {0} B: {1} C: {1} D: {0}", "rust", "java");
}




/*
run:

A: rust B: java C: java D: rust

*/

 



answered May 2, 2023 by avibootz

Related questions

1 answer 130 views
1 answer 183 views
1 answer 126 views
...