📅  最后修改于: 2022-03-11 14:49:25.281000             🧑  作者: Mango
use std::io;
// Request number
println!("Enter number? ");
let mut input = String::new();
io::stdin().read_line(&mut input).expect("Failed to read line");
let bint: i32 = input.trim()
.parse()
.ok()
.expect("Program only processes numbers, Enter number");
println!("Square {}", bint * bint); // use number