From efb7cb859e84a8c0370f45e90ea5b5bf5e3a08ea Mon Sep 17 00:00:00 2001 From: davhojt Date: Wed, 25 May 2022 03:31:02 +0300 Subject: [PATCH] docs(rpn): make error handling bullet-points --- subjects/rpn/README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/subjects/rpn/README.md b/subjects/rpn/README.md index 0378235c..04b65587 100644 --- a/subjects/rpn/README.md +++ b/subjects/rpn/README.md @@ -6,10 +6,11 @@ Write a **program** which takes a `string` containing an equation written in `Re `Reverse Polish Notation` is a mathematical notation in which every operator follows all of its operands. In RPN, every operator encountered evaluates the previous 2 operands, and the result of this operation then becomes the first of the two operands for the subsequent operator. Operands and operators must be spaced by at least one space. +- If the `string` is not valid, or if there is not exactly one argument, `Error` must be printed on the standard output followed by a newline. +- If the `string` has extra spaces it is still considered valid. + The following operators must be implemented : `+`, `-`, `*`, `/`, and `%`. -If the `string` is not valid, or if there is not exactly one argument, `Error` must be printed on the standard output followed by a newline. -If the `string` has extra spaces it is still considered valid. All the given operands must fit in a `i64`.