Post Reply 
(42S) Integer Quotient
09-19-2017, 07:45 AM
Post: #2
RE: (42S) Integer Quotient
You always need an auxiliary variable. I use "." for that.

This program will compute Quotient and Rest

Code:
Y := q.X + r

In: Y: Y
    X: X
Out: Y: r
     X: q
     L: X

00 { 22-Byte Prgm }
01>LBL "RQ"
02 X<>Y
03 STO "."
04 X<>Y
05 MOD
06 STO- "."
07 LASTX
08 STO/ "."
09 X<> "."
10 END

41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(42S) Integer Quotient - Gerald H - 09-19-2017, 06:38 AM
RE: (42S) Integer Quotient - Werner - 09-19-2017 07:45 AM
RE: (42S) Integer Quotient - Gerald H - 09-19-2017, 08:46 AM
RE: (42S) Integer Quotient - Werner - 09-19-2017, 11:20 AM
RE: (42S) Integer Quotient - Gerald H - 09-19-2017, 12:09 PM
RE: (42S) Integer Quotient - grsbanks - 09-20-2017, 10:17 AM
RE: (42S) Integer Quotient - Gerald H - 09-20-2017, 12:08 PM



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