i want to write a code to test for palindrome but that is not the main problem. the problem is the input n is a scaler . if n is 2, ill create a combination of two digits numbers and multiply them against each other. the resulting set of numbers is what i will test . if n is 3, ill create a combination of three digits numbers and multiply them with each other and test for the resulting numbers. if n=2 ill create numbers like 10,11,12,12 up to 99 and multiply them with each other , the resulting set of number is what i will test. same if n=3. can someone give me a clue on how to create this set of numbers? thanks
First, use place value to determine the range you want. Your lower bound will be 10^(n-1) and your upper bound will be (10^n)-1. For example, when n=2, your lower bound is 10 (10 to the 1st power) and your upper bound is 99 (10 to the 2nd power (100) minus one).
Once you have your upper bound and lower bound, execute a loop from the lower bound to the upper bound, and store each counter value in a collection. You then will have a collection of all the numbers that you want to multiply with each other.