For Programmers: Free Programming Magazines  


Home > Archive > Cobol > January 2006 > Re: free implementation? factorial?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: free implementation? factorial?
Karl Kiesel

2006-01-10, 7:55 am


"Louis Krupp" <lkrupp@pssw.nospam.com.invalid> schrieb im Newsbeitrag
news:11s5hqph3vd97e6@corp.supernews.com...
>... This would look something like:
>
> move 1 to factorial.
> perform varying t from 2 to number
> multiply factorial by t
> end-perform.
>
> Louis


sorry, but the result of this multiplication will be stored in t; either a
giving phrase should be added or the operands exchanged! Also the syntax of
the conditions is not standardconforming; therefore the code should read:

...
perform varying t from 2 until t > number
multiply t by factorial
end-perform

K. Kiesel


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com