when testing out palindromic numbers for three digit numbers , we could create the products of the three digits this way:
for i=999:-1:100 for j=999:-1:100 answer = i*j;
what if we do not know the number of digit and the number of digit will be the input to the code , how can i adjust the 'for loop' to cater for the unknown number of digits?
say input could be 2 digits or 4 digits or 5 digits and the code will create the products
thanks
Best Answer