Programming "Digits exploration"


[Prev][Next][Index][Thread]

Programming "Digits exploration"



AE>Hope you can help me. I wish to write a program that will take a two digit
AE>number and find the sum of the squares of its digits, take the new number
AE>and perform the same procedure. My problem is how to 'separate' the digits
AE>of the number as part of a program.


Why don't you do something like...
Prompt A
Prompt B


Say the number was 16, then enter 1 for a, and 6 for B, then do what
you want with the numbers.  Hope this helps! :)  Tell me if it works.