100-days-of-rust/Week-02/Day-08_Letter-Combinations-Of-A-Phone-Number/day8/src/main.rs
2024-08-02 21:50:37 +02:00

22 lines
447 B
Rust

use std::io::{self, Write};
use day8::combination;
fn main() {
let mut buffer = String::new();
print!("Insert the digits: ");
io::stdout().flush().expect("Failed to flush stdout.");
io::stdin()
.read_line(&mut buffer)
.expect("Failed to read the digits.");
let combinations = combination(buffer.trim());
println!(
"Those are all the possible combinations: {:?}",
combinations
);
}