mirror of
https://github.com/ASDjonok/OOP_IO-2x_2023.git
synced 2026-04-20 04:51:51 +03:00
.
This commit is contained in:
15
Rust/lab_1/src/main.rs
Normal file
15
Rust/lab_1/src/main.rs
Normal file
@@ -0,0 +1,15 @@
|
||||
fn main() {
|
||||
// use text_io::scan;
|
||||
use text_io::read;
|
||||
|
||||
print!("Input: ");
|
||||
|
||||
// read until a whitespace and try to convert what was read into an i32
|
||||
let a: i32 = read!();
|
||||
|
||||
/* let i: u32;
|
||||
print!("Input: ");
|
||||
scan!("{}", i); */
|
||||
|
||||
println!("You have input: {}", a);
|
||||
}
|
||||
Reference in New Issue
Block a user