🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang
Article #5

Re: I can't figure out how to write this program

#5
From: Ronnie Lassche
Date: Wed, 22 Nov 1995 00:00
39 lines
2143 bytes
robandrews@easynet.co.uk (Robert Andrews) wrote:
>Please give help to a Pascal beginner.
>
>I'm using TPW 1.5  and I need to write a program that checks whether a
>given number is exactly divisible by three or not.
>I will need to input a number and get a report back on if it is or
>isn't.
>I can't figure out how I am going to get the program to test this.
>
>A program will not be essential from you, but I would like to know the
>algorithm for the calculation. E-mail would be preferred.
>
>Thanks,
>Robert Andrews
>robandrews@easynet.co.uk
>



Program DivedByThree;

Uses WinCrt;

Var
  NumberIn : Integer;
  Result   : Integer;

Begin
  Write ('Give number : ');
  ReadLn (NumberIn);
  Result := Number Mod 3;
  If Result = 0 Then WriteLn (Numberin,' can be diveded by three')
                Else WriteLn (NumberIn,' can't be diveded by three');
End.

This little program should do the trick

Ronnie Lassche
 
Technical Details
Message-ID: <48uj7t$nfd@news.xs4all.nl>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <48t8ub$hld@lemon.easynet.co.uk>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 15878d,bb2b906775402ad5
X-Google-Attributes: gid15878d,public
X-Google-Thread: 102601,bb2b906775402ad5
X-Google-Attributes: gid102601,public
X-Google-Thread: 111659,bb2b906775402ad5
X-Google-Attributes: gid111659,public
X-Google-Thread: 10263e,bb2b906775402ad5
X-Google-Attributes: gid10263e,public
X-Google-Thread: 10261c,bb2b906775402ad5
X-Google-Attributes: gid10261c,public
X-Google-Thread: f461d,bb2b906775402ad5
X-Google-Attributes: gidf461d,public
X-Google-Thread: 1153ea,bb2b906775402ad5
X-Google-Attributes: gid1153ea,public
From: Ronnie Lassche <gitp@xs4all.nl>
Subject: Re: I can't figure out how to write this program
Date: 1995/11/22
Message-ID: <48uj7t$nfd@news.xs4all.nl>
X-Deja-AN: 119930811
references: <48t8ub$hld@lemon.easynet.co.uk>
to: robandrews@easynet.co.uk
content-type: text/plain; charset=us-ascii
organization: GITP International
mime-version: 1.0
newsgroups: comp.lang,pascal,comp.lang.pascal.borland,comp.lang.pascal.misc,ctdl.lang.pascal,maus.lang.tpascal,relcom.comp.lang.pascal,relacom.comp.lang.pascal.misc,slac.lang.pascal
x-mailer: Mozilla 1.2N (Windows; I; 16bit)