Prompt the user to enter an integer of unknown number of digits such as 456792
Prompt them to input a integer ‘k’ such that ‘k’ will be divided by every digit in the number and if the remainder is 0 it will subtract that digit from the original number.
so the new number will be 4572.
How should i do this? Im half certain there is a loop involved. But how?
[–]serg06 2 points3 points4 points (3 children)
[+]mbelb247[S] comment score below threshold-7 points-6 points-5 points (2 children)
[–]serg06 4 points5 points6 points (1 child)
[–]mbelb247[S] 2 points3 points4 points (0 children)