# GCD [fx-5800P]

fx-5800P

3 replies to this topic

### #1 Tritonio

Tritonio

• Members
• 67 posts
• Gender:Male

• Calculators:
fx-5800P, fx-991ES+, fx-991EX, HP Prime, fx-9750GIII

Posted 08 September 2019 - 11:59 AM

Small program to find the greatest common divisor on the fx-5800P.

```?M
?N
M→S
N<M
N<M⇒N→S
For 1→F To S
If Frac(S÷F)=0
Then
Cls
Locate 1,1,S÷F
If Frac(N÷(S÷F))=0 And Frac(M÷(S÷F))=0
Then
Break
IfEnd
IfEnd
Next
Cls
"GCD":S÷F```

Edited by Tritonio, 08 September 2019 - 06:38 PM.

### #2 CalcLoverHK

CalcLoverHK

Casio Freak

• Members
• 248 posts
• Gender:Male
• Location:Hong Kong
• Interests:Playing video games (Minecraft, krunker.io), calculators, programming in Casio Basic/C.Basic, Scratch (formal), IT research (sometimes)

• Calculators:
fx-50FHII (2019/1/30)
fx-9750GIII (2020/6/13)

Posted 08 September 2019 - 12:18 PM

Hi Tritonio,

(Seems you weren't active for about one year, didn't you?)

Your program has some arrangement errors: delete the return symbol between Then and Cls/Break.

And I found that you duplicated the post with same title. Is it an accident?

Cheers,
CalcLoverHK

### #3 Tritonio

Tritonio

• Members
• 67 posts
• Gender:Male

• Calculators:
fx-5800P, fx-991ES+, fx-991EX, HP Prime, fx-9750GIII

Posted 08 September 2019 - 05:57 PM

Hi!

It works with the enter after "Then" but you mean it looks better without it right?

I did not realize I double posted, I'm not sure how I did that. Is it possible to delete my other post?

### #4 CalcLoverHK

CalcLoverHK

Casio Freak

• Members
• 248 posts
• Gender:Male
• Location:Hong Kong
• Interests:Playing video games (Minecraft, krunker.io), calculators, programming in Casio Basic/C.Basic, Scratch (formal), IT research (sometimes)

• Calculators:
fx-50FHII (2019/1/30)
fx-9750GIII (2020/6/13)

Posted 09 September 2019 - 05:02 AM

Hi Tritonio,

It works with the enter after "Then" but you mean it looks better without it right?

- Yes.

I did not realize I double posted, I'm not sure how I did that. Is it possible to delete my other post?

- No. Only admins or moderators can do that. (Possibly only admins now because moderators are offline for at least months.)

And thanks for replying to me on IRC.

Cheers,

CalcLoverHK

Edited by CalcLoverHK, 09 September 2019 - 05:05 AM.

### Also tagged with one or more of these keywords: fx-5800P

#### 0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users