[Jprogramming] #: antibase

Linda Alvord lindaalvord at verizon.net
Sun Jan 26 08:29:22 UTC 2014


all not also

-----Original Message-----
From: programming-bounces at forums.jsoftware.com
[mailto:programming-bounces at forums.jsoftware.com] On Behalf Of Linda Alvord
Sent: Sunday, January 26, 2014 3:25 AM
To: programming at jsoftware.com
Subject: Re: [Jprogramming] #: antibase

    38 #:~ COINS =:/:|. 1 5 2 5r2 2
0 6 0 0 2
   COINS #. 0 6 0 0 2
38  
|                   ^
   38 #:~ COINS =:\:|. 1 5 2 5r2 2
0 0 4 1 2
   COINS #. 0 0 4 1 2
38

I guess you would have to get also possible solutions and then remove any
with fractions.

Linda    

-----Original Message-----
From: programming-bounces at forums.jsoftware.com
[mailto:programming-bounces at forums.jsoftware.com] On Behalf Of David Lambert
Sent: Saturday, January 25, 2014 8:34 PM
To: programming
Subject: [Jprogramming] #: antibase

    NB. convert 38 cents to pennies, nickels, dimes, quarters.

    38 #:~ COINS =: |. 1 5 2 5r2 2
1 1r2 1 3 0

    NB. why do I get a half dime and a nickel?

    COINS #. 1 1 0 3 0
38

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm



More information about the Programming mailing list