#### for loop Solution

The solution follows the same concept (again we need to generate all combinations for the n element). Following these steps, try to solve the problem yourself.

• Declare and initialize variable of type int and read the input from the console.
• Nest six for loops one in each other, for every single digit of the searched 6-digit numbers.
• In the last loop, using if construction check if the product of the six digits is equal to the magic number.