Jump to content



Photo
- - - - -

Help Entering A Program Please!


  • Please log in to reply
3 replies to this topic

#1 Chris14

Chris14

    Newbie

  • Members
  • Pip
  • 2 posts

  • Calculators:
    Casio fx-9750G PLUS

Posted 30 April 2008 - 05:06 AM

Okay, so here is the situation:
I am trying to put on a program I found on the internet for Euclid's Algorithm, but I am having trouble.
I have a Casio fx-9750G PLUS Graphics Calculator.
Here is the code I am using:

__________________________________________

'GCD'
"NUM 1"
?->A
"NUM 2"
?->B
1->C
Lbl 1
Int(A-B)->D
A-BxInt(A-B)->C
C=0=>Goto 2
B->A
C->B
Goto 1
Lbl 2
B
_______________________________

The calculator has a math error, and points me to this section:
A-BxInt(A-B)->C



Can someone please help me? I can't figure out what to change!


Thanks very much,
Chris

#2 kucalc

kucalc

    Casio Maniac

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly<br /><br />Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 08 May 2008 - 12:21 AM

A-BxInt(A-B)->C


Hello Chris14 and welcome to the UCF!

The problem is the subtraction within Int. It should be instead a division sign. So it should look like this:

A-B <span class=×' /> Int(A [/] B )->C

#3 Chris14

Chris14

    Newbie

  • Members
  • Pip
  • 2 posts

  • Calculators:
    Casio fx-9750G PLUS

Posted 13 May 2008 - 08:22 PM

Thank you SO much kucalc! Really appreciated!!!! :-)

#4 kucalc

kucalc

    Casio Maniac

  • Admin
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly<br /><br />Computer graphics

  • Calculators:
    fx-9860G / fx-7400G Plus / Algebra FX 2.0+ / fx-9770G / CFX-9850G / CFX-9850GB+ / TI-89 / TI-nSpire

Posted 14 May 2008 - 12:26 AM

Heh, no problem. :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users