From fc796bac75c9562db03e9b925b2a333f42854e08 Mon Sep 17 00:00:00 2001
From: Vanya Voykova <72099128+VanyaVoykova@users.noreply.github.com>
Date: Tue, 31 Aug 2021 19:07:41 +0300
Subject: [PATCH] Update digits.md
---
.../digits/digits.md | 24 +++++++++----------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/Content/Chapter-7-2-complex-loops-exam-problems/digits/digits.md b/Content/Chapter-7-2-complex-loops-exam-problems/digits/digits.md
index 313a74bf5..ac6429882 100644
--- a/Content/Chapter-7-2-complex-loops-exam-problems/digits/digits.md
+++ b/Content/Chapter-7-2-complex-loops-exam-problems/digits/digits.md
@@ -1,35 +1,35 @@
# Problem: Digits
-Write a program that reads from the console 1 integer within the range [**100 … 999**], and then prints it a predefined number of times – modifying it before each print, as follows:
-- If the number is divisible by **5** without reminder, **subtract** from it **its first digit**.
-- If the number is divisible by **3** without reminder, **subtract** from it **its second digit**
-- If none of the above-mentioned conditions is valid, **add** to it **its third digit**.
+Write a program that reads from the console 1 integer within the range [**100 … 999**], and then prints it a predefined number of times — modifying it before each print, as follows:
+- If the number is divisible by **5** without remainder, **subtract** from it **its first digit**.
+- If the number is divisible by **3** without remainder, **subtract** from it **its second digit**
+- If none of the conditions above is true, **add** to it **its third digit**.
-Print on the console **N lines**, and each line has **M numbers**, that are result of the above actions.
+Print on the console **N lines**, each containing **M numbers** that are the result of the actions above, where:
- N = sum of the first and second digit of the number.
- M = sum of the first and third digit of the number.
-## Input Data
+## Input
The input is read from the **console** and is an integer within the range [**100 … 999**].
-## Output Data
+## Output
-Print on the console **all integer numbers**, result of the above-mentioned calculations in the respective number of rows and columns as in the examples.
+Print on the console **all integers** that are the result of the above-mentioned calculations in the respective number of rows and columns as in the examples.
## Sample Input and Output
| Input | Output | Comments |
| --- | --- | --- |
-|132|129 126 123
120 119 121
123 120 119
121 123 120|(1 + 3) = 4 and (1 + 2) = 3 → 4 lines with 3 numbers in each
Input number 132
132 → division by 3 → 132 - 3 =
= 129 → division by 3 → 129 - 3 =
= 126 → division by 3 → 126 - 3 =
= 123 → division by 3 → 123 - 3 =
= 120 → division by 5 → 120 - 1 =
..... 121 → neither by 5, nor 3 → 121 + 2 = 123|
+|132|129 126 123
120 119 121
123 120 119
121 123 120|(1 + 3) = 4 and (1 + 2) = 3 → 4 lines with 3 numbers on each
Input number 132
132 → division by 3 → 132 - 3 =
= 129 → division by 3 → 129 - 3 =
= 126 → division by 3 → 126 - 3 =
= 123 → division by 3 → 123 - 3 =
= 120 → division by 5 → 120 - 1 =
..... 121 → neither by 5, nor by 3 → 121 + 2 = 123|
| Input | Output | Comments |
| --- | --- | --- |
-|376|382 388 394 400 397 403 409 415 412
418 424 430 427 433 439 445 442 448
454 460 457 463 469 475 472 478 484
490 487 493 499 505 502 508 514 520
517 523 529 535 532 538 544 550 547
553 559 565 562 568 574 580 577 583
589 595 592 598 604 610 607 613 619
625 622 628 634 640 637 643 649 655
652 658 664 670 667 673 679 685 682
688 694 700 697 703 709 715 712 718|10 lines with 9 numbers in each
Input number 376 → neither 5, nor 3 → 376 + 6 → =
= 382 → neither 5, nor 3 → 382 + 6 =
= 388 + 6 = 394 + 6 =
400 → division by 5 → 400 - 3 = 397|
+|376|382 388 394 400 397 403 409 415 412
418 424 430 427 433 439 445 442 448
454 460 457 463 469 475 472 478 484
490 487 493 499 505 502 508 514 520
517 523 529 535 532 538 544 550 547
553 559 565 562 568 574 580 577 583
589 595 592 598 604 610 607 613 619
625 622 628 634 640 637 643 649 655
652 658 664 670 667 673 679 685 682
688 694 700 697 703 709 715 712 718|10 lines with 9 numbers on each
Input number 376 → neither 5, nor 3 → 376 + 6 → =
= 382 → neither by 5, nor by 3 → 382 + 6 =
= 388 + 6 = 394 + 6 =
400 → division by 5 → 400 - 3 = 397|
## Hints and Guidelines
-Solve the problem **by yourself**, using what you learned from the previous ones. Remember that you will need to define **different** variables for each digit of the input number.
+Solve the problem **on your own**, using what you have learned from the previous ones. Remember that you have to define a **separate** variable for each digit of the input number.
-## Testing in the Judge System
+## Test in the Judge System
Test your solution here: [https://judge.softuni.org/Contests/Practice/Index/515#4](https://judge.softuni.org/Contests/Practice/Index/515#4).