Re: 82 Prob.
[Prev][Next][Index][Thread]
Re: 82 Prob.
On Mon, 2 Jun 1997, David Endahl wrote:
> Hi all,
> I am having some trouble eliminating some goto's in a
> program that I've been editing. The prog. is supposed to
> factor a number that you give. Here's the problem:
> ....
> If T>10
> Then
> 35+Y /sto/ Y : 0 /sto/ T : 0 /sto/ X
> goto 0
> Else
> goto 0
> lbl 0
You don't need goto here!
If T>10
Then
35+Y /sto/ Y : 0 /sto/ T : 0 /sto/ X
End
lbl 0
If you want to factor a number - there is a better algorithm...(and I
believe shorther then your prog, I can't see what's the point of this
part here )
e-mail me if you need suggestions
~bili
> .....
>
> Now I know that goto's are VERY BAD because they fill up the
> calcs memory quickly, but I can't find a way to get around
> this one. Any help would be appreciated. Thanx!
> -David
>
References:
- 82 Prob.
- From: David Endahl <endahld@scnc.wmston.k12.mi.us>