From 1b6b6bee61f214b67a59a66413f758809d7b7c03 Mon Sep 17 00:00:00 2001 From: davhojt Date: Wed, 15 Jun 2022 00:34:10 +0300 Subject: [PATCH] docs(get_produects): correct grammar --- subjects/get_products/README.md | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/subjects/get_products/README.md b/subjects/get_products/README.md index 27254e7a..47194187 100644 --- a/subjects/get_products/README.md +++ b/subjects/get_products/README.md @@ -2,18 +2,16 @@ ### Instructions -Create a function `get_products` that takes a vector of integers, and returns a vector of the products -of each index. For this exercise to be correct you will have to return the product of every index -except the current one. +Create a function named `get_products` that takes a vector of integers, and returns a vector of the products of each index. -Examples: [1,2,3,4] +You'll need to return the product of every index +except the current one. -- for the number `1` we get `2*3*4 = 24` -- for the number `3` we get `1*2*4 = 8` +### Example: +For `[1,2,3,4]`, we get: -### Notions - -- [Trait iterator](https://doc.rust-lang.org/std/iter/trait.Iterator.html) +- for the number `1` we get `2*3*4 = 24`. +- for the number `3` we get `1*2*4 = 8`. ### Expected functions @@ -44,3 +42,7 @@ $ cargo run [84, 12, 28, 21] $ ``` + +### Notions + +- [Trait iterator](https://doc.rust-lang.org/std/iter/trait.Iterator.html)