The last (sixth) problem of the "Programming Basics" Practical Exam requires using of several nested loops and more complex logic inside them. The problems examine participants' ability to think in an algorithmic way and to solve non-trivial coding problems that require nested loops with more complex logic and calculations, along with reading and printing data on the console.
Let's solve a few sample problems with nested loops and more complex logic: