Exhausting and exhausted!  Good Morning.   Linda

   B=:38=(+/"1) 25 10 5 1  (*"1)A=:2 4 8 38#:i.*/2 4 8 38
   C=:B*i.$B
   D=:}.C#~~:C
   D{A
0 0 1 33
0 0 2 28
0 0 3 23
0 0 4 18
0 0 5 13
0 0 6  8
0 0 7  3
0 1 0 28
0 1 1 23
0 1 2 18
0 1 3 13
0 1 4  8
0 1 5  3
0 2 0 18
0 2 1 13
0 2 2  8
0 2 3  3
0 3 0  8
0 3 1  3
1 0 0 13
1 0 1  8
1 0 2  3
1 1 0  3
   #D
23
   

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Linda Alvord
Sent: Sunday, January 26, 2014 3:29 AM
To: [email protected]
Subject: Re: [Jprogramming] #: antibase

all not also

-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Linda Alvord
Sent: Sunday, January 26, 2014 3:25 AM
To: [email protected]
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: [email protected]
[mailto:[email protected]] 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

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

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

Reply via email to