Jump to content



Photo
- - - - -

GCD [fx-5800P]

fx-5800P

  • Please log in to reply
3 replies to this topic

#1 Tritonio

Tritonio

    Casio Fan

  • Members
  • PipPip
  • 36 posts
  • Gender:Male

  • Calculators:
    FX-5800P, FX-991ES+, FX-991EX, HP Prime

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
  • PipPipPipPip
  • 149 posts
  • Gender:Male
  • Location:Hong Kong
  • Interests:Playing video games (especially Minecraft), calculators, programming (Casio Basic/Basic-like,Scratch), watching memes, IT research, mathematics...

  • Calculators:
    fx-50FHII
    fx-9860GII Emulator (trial)
    fx-CG50 Emulator (trial)

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

    Casio Fan

  • Members
  • PipPip
  • 36 posts
  • Gender:Male

  • Calculators:
    FX-5800P, FX-991ES+, FX-991EX, HP Prime

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
  • PipPipPipPip
  • 149 posts
  • Gender:Male
  • Location:Hong Kong
  • Interests:Playing video games (especially Minecraft), calculators, programming (Casio Basic/Basic-like,Scratch), watching memes, IT research, mathematics...

  • Calculators:
    fx-50FHII
    fx-9860GII Emulator (trial)
    fx-CG50 Emulator (trial)

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