From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=BAYES_05,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,30e3597af28a3026,start X-Google-Attributes: gid103376,public From: spick60809@aol.com (SPick60809) Subject: Simple algorithmic question I hope :-) Date: 1999/10/24 Message-ID: <19991023203630.01992.00000385@ng-fa1.aol.com>#1/1 X-Deja-AN: 539797399 Organization: AOL, http://www.aol.co.uk Newsgroups: comp.lang.ada X-Admin: news@aol.com Date: 1999-10-24T00:00:00+00:00 List-Id: Hi I'm a student studying ADA for the first time and need help to produce an algorithm to complete a basic program exercise I am stuck with. The program asks the user to input a large number (integer) and then input two further numbers as factors of the first; the program then checks the two numbers to see if they are indeed factors and outputs 'true' or 'false' accordingly. I cannot figure an algorithm to do this and am left with an idea that:- large number/factor number=integer would work, checking that the factor divides without remainder i.e. .0.8 etc. This does not work, telling me not to assign value to 'integer' I hope there is a simple solution I have'nt seen and would be greatfull if someone could point me that way :-) I would be very interested to know, also, if there is an online source listing various algorithms of a similar nature/maths level. Regards and thanx Sean