Rust take user input

Przykłady kodu

0
0

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

wejście rdzy

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

Podobne strony

Podobne strony do przykłady

W innych językach

Ta strona jest w innych językach

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