comp.lang.ada
 help / color / mirror / Atom feed
From: "Jeffrey R. Carter" <spam.jrcarter.not@spam.not.acm.org>
Subject: Re: language defined list of prime numbers
Date: Sat, 9 Dec 2017 18:13:30 +0100
Date: 2017-12-09T18:13:30+01:00	[thread overview]
Message-ID: <p0h5jq$qm9$1@dont-email.me> (raw)
In-Reply-To: <f4207ff1-72f0-4553-8b6f-cebfcbaea11f@googlegroups.com>

On 12/09/2017 06:05 PM, Mehdi Saada wrote:
> I might not get what you mean. I just supposed it should mandatory to provide a list of all prime numbers between 0 and let's say, 5000 at least, in the form of a function returning the next prime after N.
> I have to write a function to simplify fractions, and I very doubt the teacher wants us at this point, to implement an whole algorithm to find prime numbers (up to the squared root), just for that.

To simplify fractions, all you need is the GCD algorithm.

-- 
Jeff Carter
"Ada has made you lazy and careless. You can write programs in C that
are just as safe by the simple application of super-human diligence."
E. Robert Tisdale
72


  reply	other threads:[~2017-12-09 17:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-09 15:57 language defined list of prime numbers Mehdi Saada
2017-12-09 16:18 ` Mr. Man-wai Chang
2017-12-09 17:05   ` Mehdi Saada
2017-12-09 17:13     ` Jeffrey R. Carter [this message]
2017-12-09 17:23       ` Mr. Man-wai Chang
2017-12-09 19:17         ` Mehdi Saada
2017-12-13 10:41           ` Mr. Man-wai Chang
2017-12-15  5:58             ` Dirk Heinrichs
2017-12-15 11:41               ` Mr. Man-wai Chang
2017-12-15 15:32                 ` Dirk Heinrichs
2017-12-09 16:43 ` Dennis Lee Bieber
2017-12-09 19:09 ` Mehdi Saada
replies disabled

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