The program simply prints even numbers from 1 to 10. It goes through each number one by one and checks if it can be divided by 2 without any leftovers. If yes, it's called an even number and gets ...
The for loop is an entry-controlled loop, which means that it checks whether the test condition is true before executing the statements inside it. The various parts of the for loop are: Initialization ...