Article View: be.comp.programming
Article #12626Re: pascal vraagje
From: Joris Janssens
Date: Tue, 23 Oct 2001 16:26
Date: Tue, 23 Oct 2001 16:26
29 lines
1929 bytes
1929 bytes
> Ok, kheb al iets gevonden > > PROGRAM priemgetallen; > VAR > getal : INTEGER; > BEGIN > FOR getal := 1 TO 100 DO > BEGIN > if (getal mod 2=1) and (getal mod 3 >= 1) and (getal mod 4 >= 1) and > (getal mod 5 >= 1) and (getal mod 6 >=1) > and (getal mod 7 >= 1) and (getal mod 8 >=1) and (getal mod 9 >= 1) > then > > writeln(getal) > END > END. > > Maar is dit niet wat omslachtig ? Ik vind het precies zoveel code voor een > simpel ding. Is m'n logica juist ? Ik zou eerder zeggen: "Is dat alles??? Een for-loop en een if-then?!" Ik denk niet dat je iets simpeler kan vinden. -- Joris "flotspe" Janssens http://users.pandora.be/flotspe/ http://www.xhtml.be http://www.w3.org
Technical Details
Message-ID:
<DSgB7.1068$yZ.116@afrodite.telenet-ops.be>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!opentransit.net!newsfeeds.belnet.be!news.belnet.be!ossa.telenet-ops.be!afrodite.telenet-ops.be.POSTED!not-for-mailReferences:
<qggB7.804$yZ.177@afrodite.telenet-ops.be> <cOgB7.1052$yZ.108@afrodite.telenet-ops.be>Show Full Headers
Complete Article Headers
X-Google-Language: DUTCH,ASCII-7-bit X-Google-Thread: fcea4,2a0e47af4eb831ae X-Google-Attributes: gidfcea4,public X-Google-ArrivalTime: 2001-10-23 09:26:14 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!newsfeed.direct.ca!look.ca!opentransit.net!newsfeeds.belnet.be!news.belnet.be!ossa.telenet-ops.be!afrodite.telenet-ops.be.POSTED!not-for-mail From: "Joris Janssens" <joris.janssens@xhtml.be> Newsgroups: be.comp.programming References: <qggB7.804$yZ.177@afrodite.telenet-ops.be> <cOgB7.1052$yZ.108@afrodite.telenet-ops.be> Subject: Re: pascal vraagje Lines: 30 Organization: xhtml.be MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Message-ID: <DSgB7.1068$yZ.116@afrodite.telenet-ops.be> Date: Tue, 23 Oct 2001 16:26:11 GMT NNTP-Posting-Host: 213.224.68.20 X-Complaints-To: abuse@pandora.be X-Trace: afrodite.telenet-ops.be 1003854371 213.224.68.20 (Tue, 23 Oct 2001 18:26:11 MET DST) NNTP-Posting-Date: Tue, 23 Oct 2001 18:26:11 MET DST