Print Leading Zeros In Rust

April 2024
fn main() {
  let num = 10;
  println!("{:0>5}", num);
}
Output:
00010
end of line