use std::{
io::{stdout, Write},
thread::sleep,
time::Duration,
};
fn main() {
let mut stdout = stdout();
for i in 0..=100 {
print!("
Processing {}%...", i);
// or
// stdout.write(format!("
Processing {}%...", i).as_bytes()).unwrap();
stdout.flush().unwrap();
sleep(Duration::from_millis(20));
}
println!();
}