Skip to content

Commit 0a3cd20

Browse files
pedrodesuPedro Ferreira
andauthored
fix(previousprime): improve solution and subject (#3043)
Co-authored-by: Pedro Ferreira <pedro.ferreira@01talent.com>
1 parent 2994e32 commit 0a3cd20

2 files changed

Lines changed: 4 additions & 9 deletions

File tree

subjects/previousprime/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
### Instructions
44

5-
Create a **function** which returns the first prime number which is less than or equal to the `u64` passed as an argument.
5+
Create a **function** which returns the biggest prime number which is smaller than the `u64` passed as an argument.
66

77
If there are no smaller primes, the function should return `0`.
88

@@ -13,13 +13,13 @@ If there are no smaller primes, the function should return `0`.
1313

1414
```rust
1515
pub fn prev_prime(nbr: u64) -> u64 {
16-
16+
todo!()
1717
}
1818
```
1919

2020
### Usage
2121

22-
Here is a possible program to test your function :
22+
Here is a possible program to test your function:
2323

2424
```rust
2525
use previousprime::*;
@@ -29,7 +29,7 @@ fn main() {
2929
}
3030
```
3131

32-
And its output :
32+
And its output:
3333

3434
```console
3535
$ cargo run

subjects/previousprime/main.rs

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)