fn main() {
let number = 105359040400;
let formatted = format_number_with_commas(number);
println!("{}", formatted);
}
fn format_number_with_commas(num: u64) -> String {
let num_str = num.to_string();
let mut formatted = String::new();
for (i, c) in num_str.chars().rev().enumerate() {
if i != 0 && i % 3 == 0 {
formatted.insert(0, ',');
}
formatted.insert(0, c);
}
formatted
}