Standard Input and Output

Writing to standard output

fn main() {
    println!("Hello World!!!");
}

Reading from standard input

fn main() {
    let mut line =  String::new();
    std::io::stdin().read_line(& mut line).expect("cannot read");

    let line = line.trim();

    println!("You entered {line}");
}