Browse Source

docs(scalar): correct grammar

DEV-3198-new-go-exercise-get-digit-len
davhojt 2 years ago committed by Dav Hojt
parent
commit
614c01f106
  1. 22
      subjects/scalar/README.md

22
subjects/scalar/README.md

@ -2,21 +2,17 @@
### Instructions ### Instructions
Create the following **functions**, which each receives two parameters: Create the following **functions**, which each accept two parameters:
- `sum`, which returns the sum between two values from 0 to 255 - `sum`, which returns the sum between two values from 0 to 255
- `diff`, which returns the difference between two values from -32768 to 32767 - `diff`, which returns the difference between two values from -32768 to 32767
- `pro`, which returns the product of the multiplication between two values from -128 to 127 - `pro`, which returns the product of the multiplication between two values from -128 to 127
- `quo`, which returns the quotient of the division between two values (32bit and you have to figure out the second part) - `quo`, which returns the quotient of the division between two 32bit values
- `rem`, which returns the remainder of the division between two values (32bit and you have to figure out the second part) - `rem`, which returns the remainder of the division between two 32bit values
You **must** complete the Expected functions parameters data type accordingly (Replace the Xs)! > You will need to figure out the exact data types for the parameters **and** the return values.
There are some hints in the example.
### Notions
- [Data Types](https://doc.rust-lang.org/book/ch03-02-data-types.html)
### Expected functions (Incomplete, you must precise the Data Types)
```rust ```rust
pub fn sum(a: X , b: X) -> X { pub fn sum(a: X , b: X) -> X {
@ -40,9 +36,7 @@ pub fn rem(a: X, b: X) -> X {
} }
``` ```
### Usage : ### Example
#### Note that There is no output for this test for you to train to comment accordingly.
```rust ```rust
use scalar::*; use scalar::*;
@ -65,3 +59,7 @@ fn main() {
println!("rem : {}", rem(-128.23, 2.0));// 'rem : -0.22999573' println!("rem : {}", rem(-128.23, 2.0));// 'rem : -0.22999573'
} }
``` ```
### Notions
- [Data Types](https://doc.rust-lang.org/book/ch03-02-data-types.html)
Loading…
Cancel
Save