锈取用户输入

代码示例

0
0

锈取用户输入

//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");
}
-1
0

锈输入

//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");
}

类似页面

带有示例的类似页面

其他语言

此页面有其他语言版本

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
Español
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................