--- In [email protected], "supersensitive_ad" <[EMAIL PROTECTED]> wrote: > > --- In [email protected], Benjamin Scott > <benjamin_cail_scott@> wrote: > > > > How about this Puescode? > > > > Procedure Factoring (a, b) > > > > 1. loop until b => a > > 1.2 if a mod b = 0 then > > 1.2.1 print b > > 1.2.2 factor(a / b, b) > > else > > 1.3.1 b = b + 1 > > > > > > This might exclude the last factor, > > but that's your problem to fix. > > > But in my requirement, function should just take one 'parameter' > (argument)and find its prime factors sso i think this method is not > quite right.
Hey, It's your homework. Besides, the second argument simply makes it more efficent code. You can easily find a way to remove it. Besides, this doesn't really need to even be recursive.
