This trivial task was given at the SoftUni exam for Java. There are not a lot of problems that I can solve, but this one was definitely one of them 🙂 So, what is the input and what is the output? At…