Hey there! Sign in to join this conversationNew here? Join for free
x Turn on thread page Beta

Delphi programming help watch

Announcements
    • Thread Starter
    Offline

    10
    ReputationRep:
    I have been assigned homework to create a delphi program which does a Fibonacci sequence but it doesnt work, any ideas

    program Fibonacci_Procedures; {$APPTYPECONSOLE} {$R *.res} uses System.SysUtils, StrUtils; VarNumber1,Number2, I, Index: Int64; ProcedureFibonacciSequence (Number : Integer);Var I :Integer;Begin for I := 1 to 25 do WriteLn (Number1, ' ', Number2); Number1 := Number1 + Number2; Number2 := Number2 + Number1;End; BeginNumber1:=1;Number2:=1;Index :=0;I:= 1; RepeatIndex:= Index+ 1;WriteLn(FibonacciSequence(Numb er));ReadLn; End.
    • Thread Starter
    Offline

    10
    ReputationRep:
    Name:  Coding.png
Views: 61
Size:  203.3 KB
    Offline

    2
    ReputationRep:
    Sorry for the late reply, it appears you have a repeat loop without an "until" boolean statement specifying the terms of the loop.
    Also, it is hard to tell what you are using the Index variable and the repeat loop for at the moment.
 
 
 
Reply
Submit reply
Turn on thread page Beta
Updated: November 22, 2015
Poll
Do you agree with the proposed ban on plastic straws and cotton buds?

The Student Room, Get Revising and Marked by Teachers are trading names of The Student Room Group Ltd.

Register Number: 04666380 (England and Wales), VAT No. 806 8067 22 Registered Office: International House, Queens Road, Brighton, BN1 3XE

Write a reply...
Reply
Hide
Reputation gems: You get these gems as you gain rep from other members for making good contributions and giving helpful advice.