This is my first rust program.
fn main() {
println!("Hello, world!");
let hello = 1;
println!("{hello}");
}
This is my first rust program.
fn main() {
println!("Hello, world!");
let hello = 1;
println!("{hello}");
}
I just learned how to get user input with Rust.
use std::io;
fn main() {
let mut input_2 = String::new();
println!("Input_2:");
io::stdin()
.read_line(&mut input_2)
.expect("Failure");
println!("You entered: {}", input_2.trim());
}
Hi there, welcome to this forum; there’s not much to comment on here yet, those looks like some standard hello-world style snippets
Opening multiple topics in quick succession with little to comment on can feel a bit out of place in this forum, which looks like is the reason why some forum user felt the approach too spammy. Sorry for the troubles, the automatic handling system for such flags is rather sensitive for new users. Feel free to keep a related follow-up post like this within the same existing forum thread[1]; in this case, I’ve merged the post into this topic for you to improve the situation
Writing a bit more about your code, or e.g. also asking some concrete questions etc., might also a good idea, especially when it isn’t really clear what to comment on / review[2].
If you’re rather interested in a platform for less formal, more fast-paced, short-messages communication style, you can also considering visiting the relevant Discord channels on Rust (e.g. either the official one, or the community channel).
If you're interested in reading arbitrary data types:
This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.