Article View: be.comp.programming
Article #12624Re: pascal vraagje
From: Regus
Date: Tue, 23 Oct 2001 16:21
Date: Tue, 23 Oct 2001 16:21
22 lines
1548 bytes
1548 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 ?
En wat met getallen kleiner dan 10 ?
Bart
Technical Details
Message-ID:
<cOgB7.1052$yZ.108@afrodite.telenet-ops.be>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!195.238.2.15!skynet.be!skynet.be!ossa.telenet-ops.be!afrodite.telenet-ops.be.POSTED!not-for-mailReferences:
<qggB7.804$yZ.177@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:21:28 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!supernews.com!news.tele.dk!small.news.tele.dk!195.238.2.15!skynet.be!skynet.be!ossa.telenet-ops.be!afrodite.telenet-ops.be.POSTED!not-for-mail From: "Regus" <regus@pandora.be> Newsgroups: be.comp.programming References: <qggB7.804$yZ.177@afrodite.telenet-ops.be> Subject: Re: pascal vraagje Lines: 25 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: <cOgB7.1052$yZ.108@afrodite.telenet-ops.be> Date: Tue, 23 Oct 2001 16:21:28 GMT NNTP-Posting-Host: 213.224.162.117 X-Complaints-To: abuse@pandora.be X-Trace: afrodite.telenet-ops.be 1003854088 213.224.162.117 (Tue, 23 Oct 2001 18:21:28 MET DST) NNTP-Posting-Date: Tue, 23 Oct 2001 18:21:28 MET DST Organization: Telenet Internet