comp.lang.ada
 help / color / mirror / Atom feed
From: Ian@wilks.demon.co.uk (Ian M Wilks)
Subject: Help Wanted
Date: Fri, 25 Nov 1994 13:39:23 +0000
Date: 1994-11-25T13:39:23+00:00	[thread overview]
Message-ID: <785770763snz@wilks.demon.co.uk> (raw)

Help, can you help please?

As an assignment I have to learn enough Ada and write the following parallel 
program:

Find the prime numbers in the first 100 numbers (1, 2, 3, ... , 99, 100) 
using the Sieve of Eratosthenes.  Write down all numbers from 2 to 100.  
The first number in the list (2) is a prime.  Strike off all multiples of 2.  
On the remaining list the next number (3) is a prime.  Strike off all 
multiples of 3, and so on.

Task 1 - Produces numbers from 2 to 100

Task 2 - outputs the first number it gets, deletes multiples of 2 from the
         list and passes the remaining list to Task 3.

Task 3 - outputs the first number it gets, deletes multiples of 3 from the
         list and passes the remaining list to Task 4.

Task n - outputs the first number it gets, deletes all multiples of the first
         number and passes the remaining list to the next task.

Can anyone let me have any code similar to this that I can adapt.  Unfortunately
I'm running out of time!!!

Thanks.




             reply	other threads:[~1994-11-25 13:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-11-25 13:39 Ian M Wilks [this message]
1994-11-26  4:22 ` Help Wanted R. William Beckwith
1994-11-26 10:19 ` David Weller
1994-11-28 15:42 ` Robert Dewar
  -- strict thread matches above, loose matches on Subject: below --
1994-12-13 15:50 Help wanted David Sanderson
1998-09-17  0:00 Help Wanted Marin David Condic, 561.796.8997, M/S 731-96
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox