huneynumb Posted May 19, 2006 Posted May 19, 2006 Find all two digit-numbers N such that N+2 is also a two-digit number and the digit sum of N+2 is less than the digit sum of N
the tree Posted May 19, 2006 Posted May 19, 2006 Can easily be achived using a simple program, but why? [b]int[/b] = [b]10[/b] while ([b]int[/b] < [b]97[/b]){ if (mod [b]int[/b],[b]10[/b] + [[b]int[/b] - mod [b]int[/b],[b]10[/b]]){ add [b]int[/b] to [b]array[/b] } }
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now