NICOMA is a port for a BBC BASIC program released by CREATIVE COMPUTTINE MORRISTOWN, NEW JERSEY.
BBC BASIC source code: http://www.vintage-basic.net/bcg/nicomachus.bas
Original book page: http://www.atariarchives.org/basicgames/showpage.php?page=117 (includes source code as well!)
NICOMA[]
NICOMA is a very simple number guessing program. You think of a number between 0 and 100. Anwser 3 questions about your number (divided by 3/5/7). Then the computer will calculate the number you had in mind!
How it works[]
This program uses a very simple calculation to calculate what your number is.
You first give the program three numbers (saved as variable A/B/C)
A=Remainder of your number divided by 3
B=Remainder of your number divided by 5
C=Remainder of your number divided by 7
Then the program uses these numbers to calculate your number:
70*A+21*B=15*C
Example: (number=30,A=0,B=0,C=2)
Then the sum is: 70*0+21*0+15*2=0+15*2=15*2=30!