Article View: comp.lang.pascal.borland
Article #644Re: PLEASE HELP ME!!!
From: M.H. Avegaart
Date: Mon, 27 Nov 2000 00:00
Date: Mon, 27 Nov 2000 00:00
100 lines
3699 bytes
3699 bytes
Question 1:
{$APPTYPE CONSOLE}
program Q1;
var
i, a, b, c, n: Integer;
begin
Write('Enter number of minutes: ');
ReadLn(n);
a := 0;
b := 1;
for i := 0 to n do
begin
c := a + b;
b := a;
a := c;
end;
WriteLn('Result: ', b);
ReadLn;
end.
Question 2:
{$APPTYPE CONSOLE}
program Q2;
var
n1, n2, i, j: Integer;
begin
Write('Lower bound: ');
ReadLn(n1);
Write('Upper bound: ');
ReadLn(n2);
Write('X':4);
for j := n1 to n2 do
Write(j:4);
WriteLn;
for i := n1 to n2 do
begin
Write(i:4);
for j := n1 to n2 do
Write(i*j:4);
WriteLn;
end;
ReadLn;
end.
"NEIGHBORS" <himars1stpm@earthlink.net> schreef in bericht
news:3A1ED99B.A59385A5@earthlink.net...
> Hello All,
> I recent was assigned the 3 following programs amongst some others but
> was
> unabe to figure out the way to complete the neccesary programming
> required
> to make these run correctly any help you could give me would be greatly
> appresheated also the instructions may ask for specific types of
> programming
> however I have found that anyway that will make the program run
> correctly
> has worked fine in the past thank you all
> 1. Your biology project is to determine te rate of growth of a
> particualr
> type of bacteria. You suspect that the bacteria population increases at
> the
> same rate as the Fibonaccci numbers, each number is equal to the sum of
> its
> two immediate predecessors. Therefore, the first few numbers are
> 1,1,2,3,5,8,13,21... Assume that your bacteria reproduce asexually once
> every minute. You will be starting with a single bacterium. The
> program
> should allow you to enter a given number of minutes. Then, the number
> of
> bacteria at the end of this time shoudl be output. Use a FOR loop.
> (only
> if u feel like it)
> 2. Write a program to display a multiplication table. The use should
> be
> asked to enter the upper and lower limits of the table. Nested FOR
> loops
> should be used to create a table similar to the following:
> X 1 2 3 4
> 1 1 2 3 4
> 2 2 4 6 8
> 3 3 6 9 12
> 4 4 8 12 16
>
>
> thanks again for any help you can give sorry to ask for so much help its
>
> just my teacher doesn't konw a damned thing about this type stuff and
> did
> nothing more then give use a sheet with this and other programs on if
> without ever hinting to us any idea on how to do such a thing.
> Sincerely
> Jon
>
>
>
Technical Details
Message-ID:
<8vt6kj$nav$1@porthos.nl.uu.net>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<3A1ED99B.A59385A5@earthlink.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10c470,1962377f24bd4fa1 X-Google-Attributes: gid10c470,public X-Google-Thread: 111659,1962377f24bd4fa1 X-Google-Attributes: gid111659,public X-Google-Thread: fe2ce,1962377f24bd4fa1 X-Google-Attributes: gidfe2ce,public X-Google-Thread: 1097b9,1962377f24bd4fa1 X-Google-Attributes: gid1097b9,public X-Google-Thread: f461d,891d352a15c61d78,start X-Google-Attributes: gidf461d,public From: "M.H. Avegaart" <avegaartNOSPAM@mccomm.nl> Subject: Re: PLEASE HELP ME!!! Date: 2000/11/27 Message-ID: <8vt6kj$nav$1@porthos.nl.uu.net> X-Deja-AN: 698158011 References: <3A1ED99B.A59385A5@earthlink.net> X-Priority: 3 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 X-Complaints-To: abuse@nl.uu.net X-Trace: porthos.nl.uu.net 975314387 23903 193.67.87.80 (27 Nov 2000 08:39:47 GMT) Organization: UUNET-NL (http://www.nl.uu.net) X-MSMail-Priority: Normal NNTP-Posting-Date: 27 Nov 2000 08:39:47 GMT Newsgroups: comp.lang.pascal.borland,comp.lang.pascal.delphi.components.writing,dk.edb.programmering.pascal,it.comp.lang.pascal,relcom.comp.lang.pascal