Fandom

Petit Computer Wiki

NICOMA (BBC BASIC port)

915pages on
this wiki
Add New Page
Comment1 Share
NICOMA

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!)

NICOMAEdit

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 worksEdit

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!

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.