📝 Added sandbox (code sketchbook)
This commit is contained in:
parent
b475595f7f
commit
b5daf18b1a
142 changed files with 100702 additions and 0 deletions
20
sandbox/hello.rs
Normal file
20
sandbox/hello.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// this is a comment, and is ignored by the compiler
|
||||
//
|
||||
// this is the main fucntion
|
||||
/* this is a
|
||||
* multiline comment*/
|
||||
|
||||
fn main() {
|
||||
// statements here are executed when the compiled binary is called
|
||||
//
|
||||
// print text to the console
|
||||
println!("Hello World!");
|
||||
}
|
||||
|
||||
// to compile simply enter into terminal:
|
||||
// rustc hello.rs
|
||||
// this will create a binary under the same name, simply run:
|
||||
// ./hello
|
||||
//
|
||||
// OUTPUTS:
|
||||
// Hello World!
|
||||
Loading…
Add table
Add a link
Reference in a new issue