Question: Design a program in c++ that finds the following: Permutation of 123456789 that each number is divisible evenly by 1 (9/1=9, 8/1=8, 7/1=7) and output

Design a program in c++ that finds the following:

Permutation of 123456789 that each number is divisible evenly by 1 (9/1=9, 8/1=8, 7/1=7) and output total results and each solution. So for 1 total number of solutions is 9 and these solutions are 1,2,3,4,5,6,7,8,9

Permutation of 123456789 that each 2 numbers are evenly divisible by 2 (12/2=6 14/2=7 16/2=8 so on and so forth between numbers any 2 digit numbers so in range of 10-99)

Permutation of 123456789 that each 3 numbers are evenly divisible by 3

Permutation of 123456789 that each 4 numbers are evenly divisible by 4

Permutation of 123456789 that each 5 numbers are evenly divisible by 5

Permutation of 123456789 that each 6 numbers are evenly divisible by 6

Permutation of 123456789 that each 7 numbers are evenly divisible by 7

Permutation of 123456789 that each 8 numbers are evenly divisible by 8

Permutation of 123456789 that each 9 numbers are evenly divisible by 9

program must provide the following functionality and adhere to the following constraints:

program should output The count of the possible solutions for 1,2,3,4,5,6, and 7 digit numbers using the digits 1-9 Example: For a 1 digit number there are 9 possible solutions

All possible solutions for 8 and 9 digit numbers in decimal format using the digits 1-9

No digit can be used more than once per number

All output should be outputted to the terminal You may not hardcode the solutions to these questions into your program. The solution must be determined as a result of your program checking numbers

The program needs to check numbers and output the total number of solution each section has.

For example: for 1 number, it checks all numbers 1-9 to find all possible solutions that will not violate rules mentioned above (such as: No digit can be used more than once per number. 1224 for 4 numbers for example isn't a solution, even though it evenly divides 1224/4 =306)

Please don't answer the question with wrong solutions, without reading the question. Only answer if you know how to do it. provide picture of program output

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!