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 ?  :');
        readln (Iterations);
        gotoxy (15,7);
        write ('Which Number do you want to see multiples of ?  :');
        readln (Multiples);

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

        readln;

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 ?  :');
        readln (Iterations);
        gotoxy (15,7);
        write ('Which Number do you want to see multiples of ?  :');
        readln (Multiples);
        clrscr;

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

        readln;

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 ?  :');
>        readln (Iterations);
>        gotoxy (15,7);
>        write ('Which Number do you want to see multiples of ?  :');
>        readln (Multiples);

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

>        readln;

>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

and make your while statement

While Counter <= Iterations do

Quote:
>                         Counter := Counter + 1;
>                         readln;
>                 End;



Sat, 15 May 2004 00:24:26 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Not a student but would like help with Pascal

2. Pascal Student needs help!!!

3. Pascal student needing help.

4. Programming Student in need of Help

5. Student needs help!

6. Students Need Help With TP 7.0

7. Student needs help with TPW

8. student needs help

9. Grade 11 Computer science student needs HELP!!!

10. A level student needs help!

11. Newbie Student NEEDS HELP

12. Student Help needed from all willing people!!!

 

 
Powered by phpBB® Forum Software