diff --git a/subjects/division_and_remainder/README.md b/subjects/division_and_remainder/README.md index 135bc922..25f24e00 100644 --- a/subjects/division_and_remainder/README.md +++ b/subjects/division_and_remainder/README.md @@ -2,21 +2,10 @@ ### Instructions -Create a **function** `divide` that receives two i32 and returns a tuple in which the first element is the result of the integer division between the two numbers and the second is the remainder of the division. - -### Notions - -- [The Tuple Type](https://doc.rust-lang.org/stable/book/ch03-02-data-types.html?highlight=accessing%20a%20tuple#compound-types) - -- [Tuples](https://doc.rust-lang.org/rust-by-example/primitives/tuples.html) - -- [Tuple Structs without Named Fields](https://doc.rust-lang.org/stable/book/ch05-01-defining-structs.html?highlight=tuple#using-tuple-structs-without-named-fields-to-create-different-types) - -### Expected Function +Create a **function** named `divide` that receives two `i32` and returns a `tuple`. The first element is the result of the integer division between the two numbers, and the second is the remainder of the division. ```rust pub fn divide(x: i32, y: i32) -> (i32, i32) { - } ``` @@ -45,3 +34,11 @@ $ cargo run 9/4: division = 2, remainder = 1 $ ``` + +### Notions + +- [The Tuple Type](https://doc.rust-lang.org/stable/book/ch03-02-data-types.html?highlight=accessing%20a%20tuple#compound-types) + +- [Tuples](https://doc.rust-lang.org/rust-by-example/primitives/tuples.html) + +- [Tuple Structs without Named Fields](https://doc.rust-lang.org/stable/book/ch05-01-defining-structs.html?highlight=tuple#using-tuple-structs-without-named-fields-to-create-different-types)