A particularly interesting program
we did this problem today in math class to kill time after a quiz, and i was wondering if i could make a program along these lines

so the idea is this:  
take the number 1,234,567,890  
the first digit from the left is divisible by 1, good, continue  
the first 2 digits from the left are divisible by 2, good, continue  
the first 3 digits from the left are divisible by 3, good, continue  
repeat, until..  
the first 7 digits from the left are NOT divisible by 7, you get a remainder, bad, restart with different numbers, or go back until one of the numbers can be replaced (the even spaces are pretty interchangeable)  
the tricky part here is that you cant use the same integer twice  
also, the last digit from the right needs to be divisible by 0, and so the fifth place has to be 5, if the last place needs to be 0. so we have _, _ _ _, 5 _ _, _ _ 0  

i want the program to print the number(s) which is(are) perfectly divisible, all the way to the ones place. im pretty sure that only one number fits this criteria, but id like to know if this is true, which is why im trying to make this program.  

what i need help with is how i should go about checking if each number divided by its place has no remainder, and how to go back if it doesnt fit.  

pretty new to coding..anything helps  
A particularly interesting program
===

we did this problem today in math class to kill time after a quiz, and i was wondering if i could make a program along these lines

so the idea is this:  
take the number 1,234,567,890  
the first digit from the left is divisible by 1, good, continue  
the first 2 digits from the left are divisible by 2, good, continue  
the first 3 digits from the left are divisible by 3, good, continue  
repeat, until..  
the first 7 digits from the left are NOT divisible by 7, you get a remainder, bad, restart with different numbers, or go back until one of the numbers can be replaced (the even spaces are pretty interchangeable)  
the tricky part here is that you cant use the same integer twice  
also, the last digit from the right needs to be divisible by 0, and so the fifth place has to be 5, if the last place needs to be 0. so we have _, _ _ _, 5 _ _, _ _ 0  

i want the program to print the number(s) which is(are) perfectly divisible, all the way to the ones place. im pretty sure that only one number fits this criteria, but id like to know if this is true, which is why im trying to make this program.  

what i need help with is how i should go about checking if each number divided by its place has no remainder, and how to go back if it doesnt fit.  

pretty new to coding..anything helps  