From edae82ec1b503aa26639d2a9e54c5ae682a59c5e Mon Sep 17 00:00:00 2001 From: Nathan Stocks Date: Wed, 4 Jan 2023 13:54:37 -0700 Subject: [PATCH] fix links to updated exercises, improve exercise e wording --- README.md | 16 ++++++++-------- exercise/e_control_flow/src/main.rs | 9 +++++---- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index b2458437..f0a8c9b7 100644 --- a/README.md +++ b/README.md @@ -83,17 +83,17 @@ For your convenience, here is a list of all the exercises, with links to view th - [Exercise A - Variables & Scope](https://github.com/CleanCut/ultimate_rust_crash_course/tree/master/exercise/a_variables) - [Exercise B - Functions](https://github.com/CleanCut/ultimate_rust_crash_course/tree/master/exercise/b_functions) -- [Exercise C - Simple Types](https://github.com/CleanCut/ultimate_rust_crash_course/tree/master/exercise/c_simple_types) -- [Exercise D - Control Flow & Strings](https://github.com/CleanCut/ultimate_rust_crash_course/tree/master/exercise/d_control_flow_strings) -- [Exercise E - Ownership & References](https://github.com/CleanCut/ultimate_rust_crash_course/tree/master/exercise/e_ownership_references) -- [Exercise F - Structs & Traits](https://github.com/CleanCut/ultimate_rust_crash_course/tree/master/exercise/f_structs_traits) -- [Exercise G - Collections & Enums](https://github.com/CleanCut/ultimate_rust_crash_course/tree/master/exercise/g_collections_enums) -- [Exercise H - Closures & Threads](https://github.com/CleanCut/ultimate_rust_crash_course/tree/master/exercise/h_closures_threads) -- [Exercise Z - Final Project](https://github.com/CleanCut/ultimate_rust_crash_course/tree/master/exercise/z_final_project) +- [Exercise C - Modules](https://github.com/CleanCut/ultimate_rust_crash_course/tree/master/exercise/c_modules) +- [Exercise D - Simple Types](https://github.com/CleanCut/ultimate_rust_crash_course/tree/master/exercise/d_simple_types) +- [Exercise E - Control Flow](https://github.com/CleanCut/ultimate_rust_crash_course/tree/master/exercise/e_control_flow) +- [Exercise ? - Ownership & References](https://github.com/CleanCut/ultimate_rust_crash_course/tree/master/exercise/) +- [Exercise ? - Structs & Traits](https://github.com/CleanCut/ultimate_rust_crash_course/tree/master/exercise/) +- [Exercise ? - Collections & Enums](https://github.com/CleanCut/ultimate_rust_crash_course/tree/master/exercise/) +- [Exercise Z - Image Manipulation](https://github.com/CleanCut/ultimate_rust_crash_course/tree/master/exercise/z_final_project) # Projects -- [Invaders](https://github.com/CleanCut/invaders) - A terminal-based Space Invaders arcade game clone. +- TBD [exercises]: https://github.com/CleanCut/ultimate_rust_crash_course#exercises diff --git a/exercise/e_control_flow/src/main.rs b/exercise/e_control_flow/src/main.rs index 212732cf..2a691578 100644 --- a/exercise/e_control_flow/src/main.rs +++ b/exercise/e_control_flow/src/main.rs @@ -31,13 +31,14 @@ fn main() { // 3. Use a `while` loop to create a vector containing the first 12 multiples of 5. // - // The loop should continue until `fives.len()` returns 12. + // The loop should continue while `fives.len()` is less than 12. // - // Each time through the loop, call `fives.push( ... )` to push `current_five` onto the vector, - // and then add 5 to `current_five`. + // Each time through the loop: + // - Call `fives.push( ... )` to push `multiple` onto the vector + // - Add 5 to `multiple` let mut fives: Vec = vec![]; - let mut current_five = 5; + let mut multiple = 5; // (write the `while` loop here)