diff --git a/subjects/logic_number/README.md b/subjects/logic_number/README.md index 1775598a..e87e2afd 100644 --- a/subjects/logic_number/README.md +++ b/subjects/logic_number/README.md @@ -2,8 +2,8 @@ ### Instructions -In this exercise the logic of sequence of numbers will be tested. -For this you have to create a function `number_logic` which will take a number `u32` and return `true` if the number is the sum of its own digits, each raised to the power of the number of digits, and `false` otherwise. +In this exercise, the logic for a sequence of numbers will be tested. +You will have to create a function which will return `true` if the number is the sum of its own digits, where each digit is first raised to the power of the number of digits. Examples: @@ -12,10 +12,6 @@ Examples: - 153 returns true, because: 153 = 1^3 + 5^3 + 3^3 = 1 + 125 + 27 = 153 - 154 returns false, because: 154 != 1^3 + 5^3 + 4^3 = 1 + 125 + 64 = 190 -### Notions - -- [patterns](https://doc.rust-lang.org/book/ch18-00-patterns.html) - ### Expected function ```rust @@ -58,3 +54,7 @@ this number returns true because the number 153 obey the rules of the sequence this number returns false because the number 154 does not obey the rules of the sequence $ ``` + +### Notions + +- [patterns](https://doc.rust-lang.org/book/ch18-00-patterns.html)