Answers for "rust take user input"

1

rust take user input

//Declare dependencies
use std::io::stdin;

fn main() {
	//Declare a mutable input string
    let mut input_string = String::new();
    stdin().read_line(&mut input_string)
    	.ok()
        .expect("Failed to read line");
}
Posted by: Guest on April-15-2021
-1

rust input

//Declare dependencies
use std::io::stdin;

fn main() {
	//Declare a mutable input string
    let mut input_string = String::new();
    stdin.read_line(&mut input_string)
    	.ok()
        .expect("Failed to read line");
}
Posted by: Guest on July-30-2020

Browse Popular Code Answers by Language