如何列印數值變數

喜爱糖葫芦發表於2024-06-11

提問

Rust 如何列印數值變數

回答

需要將數值變數轉為字串

 let n=32;
 println!("{}", n);

相關文章