On Wed, 20 Nov 2013 11:38:14 +0000, Duncan Booth wrote:

> Denis McMahon <denismfmcma...@gmail.com> wrote:

>> 1) Find all the numbers less than n that are not divisible by a, b, or
>> c.

>> ask the user for x;
>> assign the value 0 to some other variable i;
>> while i is not greater than than x do the following [
>> if i is not divisible by a and i is not divisible by b and i is not
>> divisible by c then display i to the user;
>> add 1 to i;
>> ]

> The question didn't ask to find all the numbers, it asked to count how
> many there are. ....

My post was intended as a demonstration of how you can convert a problem 
into a sequence of steps that can then be programmed into a computer. Any 
resemblance to the posted question may have been accidental.

-- 
Denis McMahon, denismfmcma...@gmail.com
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to