Post Reply 
(35s) Long Division
09-04-2024, 06:31 AM (This post was last modified: 09-04-2024 06:38 AM by Gamo.)
Post: #1
(35s) Long Division
Just a simple program to calculate Long Division.

User [Input A] for "Dividend" and [Input B] for "Divisor"

Program will find the "Quotient and Remainder"

Answer display Quotient on top line and Remainder bottom line.
----------------------------------------------------------------------
Usage: DISPLAY Fix 0

GTO . . // to start program from the top

[R/S] display A? input Dividend
[R/S] display B? input Divisor
[R/S] display Answer Q on top and R on the bottom
-----------------------------------------------------------
Example: 1234567890 ÷ 987

[R/S] A? 1234567890
[R/S] B? 987

[R/S] display answer 1250828 and 654

Quotient is 1250828
Remainder is 654
-----------------------------------------------------------
Program
Quote:0001 INPUT A
0002 INPUT B
0003 INT÷
0004 RCL A
0005 RCL B
0006 RMDR

Remark:
This is my first program to try with the HP 35s since I only got this
calculator as an app on my PC.

Another example: 77088077 ÷ 7717

Q = 9989
R = 2964

Gamo 9/2024
Find all posts by this user
Quote this message in a reply
09-04-2024, 11:11 AM (This post was last modified: 09-04-2024 11:12 AM by PedroLeiva.)
Post: #2
RE: (35s) Long Division
Very nice program Gamo, congratulations!! HP-35s is a wonderful calc, the app works just the same as the physical device. Pedro
Find all posts by this user
Quote this message in a reply
09-04-2024, 02:07 PM
Post: #3
RE: (35s) Long Division
Pedro Thank You

More program for this HP 35s is coming soon.

Thank You

Gamo
Find all posts by this user
Quote this message in a reply
09-05-2024, 04:13 AM
Post: #4
RE: (35s) Long Division
Program updated from Post #1

This program use stack only.

Example: 257803 ÷ 101

GTO . .

257803 [ENTER] 101 [R/S] display answer 2552 and 51

Q = 2552
R = 51

Program:
Quote:001 X<>Y
002 ENTER
003 ENTER
004 R↑
005 INT÷
006 LASTx
007 R↑
008 X<>Y
009 RMDR

Gamo
Find all posts by this user
Quote this message in a reply
09-05-2024, 05:26 AM
Post: #5
RE: (35s) Long Division
This saves one step:
Code:
001 X<>Y
002 ENTER
003 ENTER
004 R↑
005 INT÷
006 X<>Y
007 LASTx
008 RMDR
Find all posts by this user
Quote this message in a reply
Post Reply 




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