Post Reply 
Is HP42 smarter than a kid on TV?
04-28-2018, 11:26 PM
Post: #5
RE: Is HP42 smarter than a kid on TV?
(04-28-2018 10:32 PM)Zaphod Wrote:  you should out him in the youtube comments Big Grin

Nope, I'm not in the business of shaming anyone publicly, least of all a very young kid. He probably makes a living out of it and who knows, perhaps he'll develop a genuine interest in mathematics as he grows up.

All the same, to put my code where my mouth is, this is a 3-line, 150-byte routine for the HP-71B:

10 DATA 17,24,1,8,15,23,5,7,14,16,4,6,13,20,22,10,12,19,21,3,11,18,25,2,9
20 DESTROY ALL @ OPTION BASE 1 @ DIM A(5,5),B(5,5) @ READ A @ INPUT N
30 MAT B=((N-65)/5) @ MAT A=A+B @ MAT DISP USING "2D,2X";A

>RUN
? 265

57 64 41 48 55
63 45 47 54 56
44 46 53 60 62
50 52 59 61 43
51 58 65 42 49

>RUN
? 65

17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9

>RUN
? 300

64 71 48 55 62
70 52 54 61 63
51 53 60 67 69
57 59 66 68 50
58 65 72 49 56


A conversion to run in the HP42S is utterly straightforward and will be left as an exercise to the reader.

Regards.
V.
.

  
All My Articles & other Materials here:  Valentin Albillo's HP Collection
 
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Is HP42 smarter than a kid on TV? - Dol - 04-28-2018, 08:03 PM
RE: Is HP42 smarter than a kid on TV? - Valentin Albillo - 04-28-2018 11:26 PM



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