-
Notifications
You must be signed in to change notification settings - Fork 10.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #733 from apogeeoak/intro
feat(intro): Proposal to add successfully compiling exercise as the first exercise.
- Loading branch information
Showing
5 changed files
with
58 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Intro | ||
|
||
Rust uses the `print!` and `println!` macros to print text to the console. | ||
|
||
## Further information | ||
|
||
- [Hello World](https://doc.rust-lang.org/rust-by-example/hello.html) | ||
- [Formatted print](https://doc.rust-lang.org/rust-by-example/hello/print.html) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// intro1.rs | ||
// About this `I AM NOT DONE` thing: | ||
// We sometimes encourage you to keep trying things on a given exercise, even | ||
// after you already figured it out. If you got everything working and feel | ||
// ready for the next exercise, remove the `I AM NOT DONE` comment below. | ||
// Execute the command `rustlings hint intro1` for a hint. | ||
|
||
// I AM NOT DONE | ||
|
||
fn main() { | ||
println!("Hello and"); | ||
println!(r#" welcome to... "#); | ||
println!(r#" _ _ _ "#); | ||
println!(r#" _ __ _ _ ___| |_| (_)_ __ __ _ ___ "#); | ||
println!(r#" | '__| | | / __| __| | | '_ \ / _` / __| "#); | ||
println!(r#" | | | |_| \__ \ |_| | | | | | (_| \__ \ "#); | ||
println!(r#" |_| \__,_|___/\__|_|_|_| |_|\__, |___/ "#); | ||
println!(r#" |___/ "#); | ||
println!(); | ||
println!("This exercise compiles successfully. The remaining exercises contain a compiler"); | ||
println!("or logic error. The central concept behind Rustlings is to fix these errors and"); | ||
println!("solve the exercises. Good luck!"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
// intro2.rs | ||
// Make the code print a greeting to the world. | ||
// Execute `rustlings hint intro2` for a hint. | ||
|
||
// I AM NOT DONE | ||
|
||
fn main() { | ||
println!("Hello {}!"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters