Browse Source

additional informations

content-update
Chris 3 years ago
parent
commit
4e29a4e198
  1. 14
      subjects/division_and_remainder/README.md
  2. 2
      subjects/matrix_transposition/README.md
  3. 18
      subjects/tuples/README.md

14
subjects/division_and_remainder/README.md

@ -2,7 +2,15 @@
### 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.
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
@ -14,10 +22,10 @@ pub fn divide(x: i32, y: i32) -> (i32, i32) {
### Usage
Here is a program to test you're function
Here is a program to test your function
```rust
use division_and_remainder::division_and_remainder;
use division_and_remainder::divide;
fn main() {
let x = 9;

2
subjects/matrix_transposition/README.md

@ -27,6 +27,8 @@ Example:
- [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)
- [Adding Useful Functionality with Derived Traits](https://doc.rust-lang.org/stable/book/ch05-02-example-structs.html?highlight=debug%20deriv#adding-useful-functionality-with-derived-traits)

18
subjects/tuples/README.md

@ -2,12 +2,26 @@
### Instructions
- Define a tuple structure to represent a student.
- Define a tuple structure to represent a `Student`.
- Each student is identified by an id number of type i32, his/her name and his/her last name as a string Print the content of the tuple to stdout
- Then define three functions to return the id, first name and last name.
### Notions
- [Defining a struct](https://doc.rust-lang.org/stable/book/ch05-01-defining-structs.html)
- [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)
- [Adding Useful Functionality with Derived Traits](https://doc.rust-lang.org/stable/book/ch05-02-example-structs.html?highlight=debug%20deriv#adding-useful-functionality-with-derived-traits)
- [Chapter 7](https://doc.rust-lang.org/stable/book/ch07-03-paths-for-referring-to-an-item-in-the-module-tree.html)
### Expected Functions
```rust
@ -23,7 +37,7 @@ pub fn last_name(student: &Student) -> String {
### Usage
Here is a program to test you're functions
Here is a program to test your functions
```rust
use tuples::*;

Loading…
Cancel
Save