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 - 04: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

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

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

Posted 07 May 2008 - 11:21 PM

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 - 07:22 PM

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

#4 kucalc

kucalc

    Casio Maniac

  • [Legends]
  • PipPipPipPipPipPipPipPip
  • 1422 posts
  • Gender:Male
  • Location:USA
  • Interests:Programming: C/C++, Fortran, LISP, COBOL 85 Standard, PHP, x86 and SH3 Assembly

    Computer graphics

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

Posted 13 May 2008 - 11:26 PM

Heh, no problem. :)


1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users