Page 1 of 1

FirstNPrimes v1.0

Posted: Sun Feb 07, 2016 7:18 pm
by Anuj Dhawan
Hello,

we have a new download!

Title: FirstNPrimes
Description: This REXX program is written for ooREXX. As the name of the program suggests, output of the program is 'prime numbers'. User enters in a number, say N. After successful execution of the program, output is the prime numbers until N starting from 1.

This program was submitted by Enrico Sorichetti.
Category: REXX
Click app.php/downloadsystemcat?id=3 to go to the download page!

Have fun!

Re: FirstNPrimes v1.0

Posted: Mon Feb 08, 2016 11:08 am
by Eklavya Bharti
Hi,

You've written that this can be used for ooREXX but I think we can modify to work it for mainframes too?

Re: FirstNPrimes v1.0

Posted: Mon Feb 08, 2016 11:53 am
by Anuj Dhawan
Hi,

Yes, you can do that. enrico-sorichetti can have a better opinion though.

Re: FirstNPrimes v1.0

Posted: Mon Feb 08, 2016 2:30 pm
by enrico-sorichetti
just change the first line

Code: Select all

#!  /usr/bin/rexx
to

Code: Select all

/* rexx */
oops ...
also change the c-like construct

Code: Select all

<a> += <b> 
to

Code: Select all

<a> = <a> + <b>