From 9153dffb8660ecaa07481bfdb6feb6ae5e850b9f Mon Sep 17 00:00:00 2001 From: Gregory Gauthier Date: Tue, 3 Feb 2026 12:21:43 +0000 Subject: [PATCH] add another sieve example --- jcl/SIEVE08.jcl | 6 ++++++ src/SIEVE08.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 jcl/SIEVE08.jcl create mode 100644 src/SIEVE08.c diff --git a/jcl/SIEVE08.jcl b/jcl/SIEVE08.jcl new file mode 100644 index 0000000..b1b52ff --- /dev/null +++ b/jcl/SIEVE08.jcl @@ -0,0 +1,6 @@ +//SIEVE08 JOB (GCC),'Sieve 8 Example', +// NOTIFY=@05054,CLASS=A,MSGCLASS=H, +// MSGLEVEL=(1,1),REGION=4M,TIME=1440 +//* Compile Step +//STEP1 EXEC GCCCG,INFILE='@05054.SRCLIB.C(SIEVE08)' +// \ No newline at end of file diff --git a/src/SIEVE08.c b/src/SIEVE08.c new file mode 100644 index 0000000..fededb7 --- /dev/null +++ b/src/SIEVE08.c @@ -0,0 +1,47 @@ +#include + +#define LIMIT 10000 +#define PRIMES 1000 + + +int main() +{ + int i,j,numbers[LIMIT]; + int primes[PRIMES]; + + for (i=0;i