Then we will start writing
- We will initialize first digit:
d1 = 0.
- We will set a condition for each loop: the digit will be less than or equal to 9.
- In the beginning of every loop we set a value of the next digit, in this case:
d2 = 0. In the nested
forloops we initialize the variables in the inner loops at each increment of the outer ones.We want to do the same here.
- At the end of each loop we will increase the digit by one :
- In the innermost loop we will make the check and if necessary , we will print on the console.