The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 795 - File: showthread.php PHP 7.4.33 (FreeBSD)
File Line Function
/showthread.php 795 errorHandler->error





Post Reply 
(71B) Digital Root of Integers
06-27-2016, 03:23 AM
Post: #1
(71B) Digital Root of Integers
Add all the numbers of an integer and repeat until you have a single digit (1-9).

Program DROOT (52 bytes)

10 DESTROY N
20 INPUT “INTEGER:”;N
22 N=IP(N)
30 D=1+MOD(N-1,9)
40 DISP D
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(71B) Digital Root of Integers - Eddie W. Shore - 06-27-2016 03:23 AM



User(s) browsing this thread: 1 Guest(s)