Ask your own question, for FREE!
Mathematics 20 Online
OpenStudy (cathyangs):

Does anyone know BASIC programming? can anyone help me!?!

OpenStudy (anonymous):

Programming is basically a bunch of if and then statements and conditions that tell your computer how and when to do something. Thats the kind i have done anyway...

OpenStudy (cathyangs):

ok...do you know BASIC? I have a problem with one of my programs.

OpenStudy (anonymous):

try hexadecimal code. Wait, what is specifically wrong with it?

OpenStudy (cathyangs):

...huh? my program is in TI BASIC(variation of BASIC) here: :ClrHome Input"1st Numger", X Input"2nd Number", Y 1->Z While Z=1 abs(x-y)->A If X<Y then A->Y end If y<x then a->x end If x=y then Disp "GCF=",X 2->Z end End Stop

OpenStudy (anonymous):

what are you trying to do?

OpenStudy (cathyangs):

its using Euclid's algorithm to find the GCF of any two integers.

OpenStudy (anonymous):

ok, so what is the algorithim? Check your syntax.

OpenStudy (anonymous):

do you want to make your own or...

OpenStudy (cathyangs):

the algorithm is that you take the two numbers, and essential treat them as an ordered pair. You find the positive difference of the pair, and put that as one number in the new pair. the other number in the new pair would be the smaller of the original two.

OpenStudy (cathyangs):

I don't have TI connect...or a cable cord.

OpenStudy (anonymous):

oh sh*t. maybe you can use something to open it and take the code in there and input it to your calculator

OpenStudy (cathyangs):

... or you could help me debug my program? do you know TI BASIC?

OpenStudy (anonymous):

Well i can only promise to try. I have a calculator myself. Let me try to input your code. Hold on.

OpenStudy (anonymous):

I just spotted something in your code. It says 1st numger

OpenStudy (cathyangs):

k...well that's my typo, not the problem in the code.

OpenStudy (anonymous):

ok hold on

OpenStudy (anonymous):

i cant find my equals sign UO.O

OpenStudy (cathyangs):

it's in second math.

OpenStudy (anonymous):

thnks

OpenStudy (anonymous):

huh. It said syntax error at the ".

OpenStudy (cathyangs):

which one?

OpenStudy (anonymous):

the first.

OpenStudy (cathyangs):

huh...? are you typing INPUT or using the program module?

OpenStudy (anonymous):

:D...

OpenStudy (cathyangs):

when I run it, it doesn't have a syntax error, but only gives me the GCF with certain numbers.

OpenStudy (cathyangs):

...what's that supposed to mean?

OpenStudy (anonymous):

Im going to RE;Code it with the module.

OpenStudy (cathyangs):

... ok.

OpenStudy (anonymous):

cant find abs....wait... ive seen it b4.

OpenStudy (cathyangs):

just use the catalogue

OpenStudy (anonymous):

o.o i dont have one.

OpenStudy (anonymous):

what kind of calc do you have?

OpenStudy (cathyangs):

it's second zero.

OpenStudy (cathyangs):

I have a TI 84 plus

OpenStudy (cathyangs):

its' the smae type of code though

OpenStudy (anonymous):

Ok good we hve the same. I found the catalog b4 you answered sorry bout that.

OpenStudy (cathyangs):

ok

OpenStudy (anonymous):

I don't see 1st or 2nd number.

OpenStudy (cathyangs):

huh?

OpenStudy (cathyangs):

when you run the program?

OpenStudy (anonymous):

Is it something i just type?

OpenStudy (cathyangs):

yes...it's what the input asks for.

OpenStudy (anonymous):

So now when i run it it goes to the quote before "1ST NUMBER"

OpenStudy (cathyangs):

...that' really weird. are you using the quote above +?

OpenStudy (cathyangs):

...hello?

OpenStudy (cathyangs):

*sigh*

OpenStudy (anonymous):

im still here. What i typed was what do you mean but itsgone...

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!