use std::io::{self, Write};
const RESET: &str = "\x1b[0m";
const RED: &str = "\x1b[31m";
const GRAY: &str = "\x1b[90m";
pub fn prompt_u64(prompt: &str) -> u64{
let mut input_user = String::new();
loop{
input_user.clear();
println!("{}[only positive numbers]{}",GRAY,RESET);
print!("{}:",prompt);
io::stdout().flush().expect("Error displaying your buffer.");
io::stdin().read_line(&mut input_user).expect("Error in text input.");
match input_user.trim().parse::<u64>(){
Ok(n) => return n,
Err(_) => {
println!(" {}->{} {} {}is not a valid number! Try again.{}",RED,RESET,input_user.trim(),RED,RESET);
}
}
};
}