|
-
May 1st, 2009, 05:06 AM
#1
Thread Starter
New Member
squared digit length
am a vb.net beginner anyone please help me solve the following assignment so that i am able to know where to start from
The following process determines the squared digit length of an integer. Take
any integer and add up the squares of its digits. This will give you another
integer. Repeat this procedure until the number you end up with is 1 or 4.
The number of times this process has to be repeated before it gets to one or
4 is the squared digit length. For example, if we start with 48, we get:
4^2 + 8^2 = 80
8^2 + 0^2 = 64
6^2 + 4^2 = 52
5^2 + 2^2 = 29
2^2 + 9^2 = 85
8^2 + 5^2 = 89
8^2 + 9^2 = 145
1^2 + 4^2 + 5^2 = 42
4^2 + 2^2 = 20
2^2 + 0^2 = 4
1
This process shows that the squared digit length of 48 is 10.
Last edited by shalini22; May 1st, 2009 at 10:03 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|