Not a student but would like help with Pascal (Need Help)
Author Message
Not a student but would like help with Pascal (Need Help)

I have written this program but i cant get it to work properly see original
post
Not a student but would like help with Pascal

Program Multiplier (input,output);

{Author - PHILIP BREEZE
Date 23/11/01}

Uses crt;

Var
Iterations : integer;
Multiples : integer;
Outcome : integer;
Counter : integer;

Begin
clrscr;
Counter := 0;
gotoxy (20,1);
writeln ('Welcome to the Multiplier Program');
gotoxy (20,2);
writeln ('---------------------------------');
gotoxy (15,5);
write ('How many times do you wish the program to loop ?  :');
gotoxy (15,7);
write ('Which Number do you want to see multiples of ?  :');

While Counter < Iterations do
Begin
clrscr;
Outcome := Multiples * Iterations;
writeln (Multiples,' * ',Iterations, ' = ',Outcome);
Counter := Counter + 1;
End;

End.

Tue, 11 May 2004 21:07:13 GMT
Not a student but would like help with Pascal (Need Help)
Hi,
I'm a learner and I've had a go of sorting it out.
Hope this is what you want.

Thanks for the opportunity,

John

Program Multiplier (input,output);

{Author - PHILIP BREEZE
Date 23/11/01}

Uses crt;

Var
Iterations : integer;
Multiples : integer;
Outcome : integer;
Counter : integer;

Begin
clrscr;
Counter := 0;
gotoxy (20,1);
writeln ('Welcome to the Multiplier Program');
gotoxy (20,2);
writeln ('---------------------------------');
gotoxy (15,5);
write ('How many times do you wish the program to loop ?  :');
gotoxy (15,7);
write ('Which Number do you want to see multiples of ?  :');
clrscr;

While Counter < Iterations do
Begin
Counter := Counter + 1;
Outcome := Multiples * Counter;
gotoxy(1,Counter);
write(Multiples,' * ',Counter, ' = ',Outcome);
End;

End.

On Fri, 23 Nov 2001 13:07:13 GMT, "Negligent Duke"

Quote:

>I have written this program but i cant get it to work properly see original
>post
>Not a student but would like help with Pascal

>Program Multiplier (input,output);

>{Author - PHILIP BREEZE
> Date 23/11/01}

>Uses crt;

>Var
>        Iterations : integer;
>        Multiples : integer;
>        Outcome : integer;
>        Counter : integer;

>Begin
>        clrscr;
>        Counter := 0;
>        gotoxy (20,1);
>        writeln ('Welcome to the Multiplier Program');
>        gotoxy (20,2);
>        writeln ('---------------------------------');
>        gotoxy (15,5);
>        write ('How many times do you wish the program to loop ?  :');
>        gotoxy (15,7);
>        write ('Which Number do you want to see multiples of ?  :');

>        While Counter < Iterations do
>                Begin
>                        clrscr;
>                        Outcome := Multiples * Iterations;
>                        writeln (Multiples,' * ',Iterations, ' = ',Outcome);
>                        Counter := Counter + 1;
>                End;

>End.

Wed, 12 May 2004 06:13:03 GMT
Not a student but would like help with Pascal (Need Help)

Quote:
> I have written this program but i cant get it to work properly see original
> post
> Not a student but would like help with Pascal

>         While Counter < Iterations do
>                 Begin
>                         clrscr;
>                         Outcome := Multiples * Iterations;
>                         writeln (Multiples,' * ',Iterations, ' = ',Outcome);

You want to replace "Iterations" with "Counter"

Iterations is Final count.

For your purposes, you may want to initialize

Counter := 1

While Counter <= Iterations do

Quote:
>                         Counter := Counter + 1;