mirror of https://github.com/01-edu/public.git
docs(find_factorial): correct grammar
This commit is contained in:
parent
fe2f708d89
commit
44569ae829
|
@ -2,21 +2,19 @@
|
||||||
|
|
||||||
### Instructions
|
### Instructions
|
||||||
|
|
||||||
Complete the **function** `factorial` to return the factorial of a given number.
|
Create a **function** named `factorial` which returns the factorial of a given number.
|
||||||
|
|
||||||
As a reminder the factorial of a number is the product of all the integers from 1 to that number.
|
|
||||||
|
|
||||||
Example: the factorial of 6 (written 6!) is 1 \* 2 \* 3 \* 4 \* 5 \* 6 = 720.
|
|
||||||
|
|
||||||
Do not forget the rules for 0 and 1.
|
|
||||||
|
|
||||||
### Expected Function
|
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
pub fn factorial(num: u64) -> u64 {
|
pub fn factorial(num: u64) -> u64 {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
As a reminder, the factorial of a number is the product of all the integers from 1 to that number.
|
||||||
|
|
||||||
|
Example: the factorial of 6 (written 6!) is 1 \* 2 \* 3 \* 4 \* 5 \* 6 = 720.
|
||||||
|
|
||||||
|
> Do not forget the rules for 0 and 1.
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
|
|
||||||
Here is a possible program to test your function :
|
Here is a possible program to test your function :
|
||||||
|
|
Loading…
Reference in New Issue