Hints and Guidelines

We can calculate the basic and additional bonus points with a series of if-else-if-else conditions. For the main bonus points we have 3 cases (when the entered number is up to 100, between 100 and 1000 and larger than 1000), and for extra bonus points - 2 more cases (when the number is even and odd).

Here's an example solution::

Note that for this exercise, the judge is set to ignore anything that is not a number, so we can print not only the numbers, but also the specifying text.

Testing in the Judge System

Test your solution from the example here: https://judge.softuni.bg/Contests/Practice/Index/506#5.

results matching ""

    No results matching ""