College Help PLease? 
Author Message
 College Help PLease?

Will someone please help me change the two following problems.  The
first one is an example our tewacher gave us and he said we should
change only a few things and it should be able to read as input a
sentence of up to 150 characters and then display as output the sentence
in reverse order. Example I need help would be displayed as help need I.
The second program is one that i started on to make it do this output.  

[ Classhlp.pas 1K ]
Program SoftArray (Input, Output);
CONST
     MaxValue = 10;
Type NumArray = Array [1..MaxValue] of INteger;
VAR
   A : NumArray;
   j, count: integer;

Procedure SelectSort (Var N: NumArray; MaxValue: Integer);
Var j, MinIndex, Afterj, temp : integer;

Begin {Select Sort}
      For j := 1 to MaxValue - 1 do
          Begin
               MinIndex := j;
          For Afterj := j to MaxValue do
          Begin
               If N[Afterj] = N[MinIndex] then
                  MinIndex := afterj
                  End; {For after j}
               If MinIndex <> j then
               Begin
                    Temp := N[j];
                    N[j] := N[MinIndex];
                    N[MinIndex] := temp
                    End; {for j}
                    End;
                    End; {Select Sort}
                    Begin {Soft Array}
                    Writeln ('Enter up to 10 integers on 1 line ending with 0');
                    Count := 1;
                    Repeat
                    Read (A[Count]);
                    Count := Count + 1
                    until (A[count - 1] = 0) or (Count > MaxValue);
                    SelectSort (A, count -2);
                    Writeln;
                    For j := 1 to count do
                    Write (A[j])
                    End. {Sort Array}

[ Program7.pas < 1K ]
Program ReverseSentence (Input, Output);
CONST
     StringSize = 150;
Type
IndexRange = 1..StringSize;
CharArray = Array [IndexRange] of Char;

VAR
   I : IndexRange;
   Sentence : CharArray;
   Begin
   for I := 1 to StringSize do
       Read (Sentence[I]);
       Readln;
       Write ('Enter sentence to be displayed in reverse');
       for I := 1 to StringSize do
           Write (Sentence[I]);
           Writeln
           End.



Wed, 18 Jun 1902 08:00:00 GMT  
 College Help PLease?

Quote:

>Will someone please help me change the two following problems.  The
>first one is an example our tewacher gave us and he said we should
>change only a few things and it should be able to read as input a
>sentence of up to 150 characters and then display as output the sentence
>in reverse order. Example I need help would be displayed as help need I.
>The second program is one that i started on to make it do this output.  

Gee, another do.my.homework message...do people EVER read the FAQ?


Wed, 18 Jun 1902 08:00:00 GMT  
 College Help PLease?

Quote:


> >Will someone please help me change the two following problems.  The
> >first one is an example our tewacher gave us and he said we should
> >change only a few things and it should be able to read as input a
> >sentence of up to 150 characters and then display as output the sentence
> >in reverse order. Example I need help would be displayed as help need I.
> >The second program is one that i started on to make it do this output.

> Gee, another do.my.homework message...do people EVER read the FAQ?

Probably not.
How do they expect to learn?

- Asbj?rn



Wed, 18 Jun 1902 08:00:00 GMT  
 College Help PLease?



Quote:
> >Will someone please help me change the two following problems.  The
> >first one is an example our tewacher gave us and he said we should
> >change only a few things and it should be able to read as input a
> >sentence of up to 150 characters and then display as output the sentence
> >in reverse order. Example I need help would be displayed as help need I.
> >The second program is one that i started on to make it do this output.  

> Gee, another do.my.homework message...do people EVER read the FAQ?

Hmm... how did you start programming? Anyway, you're not supposed to
do his homework for him, just give him some nudges into the right
direction and let him figure it out from there. That's the best way
of learning.

--
[+]>>-- - .oO Bernhard van Staveren Oo. - --<<[+]
|                                               |


| Http: http://pitel-lnx.ibk.fnt.hvu.nl/~madcat |
|                                               |
[+]>>-- - .oO  Xirian  Consultancy  Oo. - --<<[+]



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. College needs help tpb7 where to put

2. help college student!

3. HELP A college student!

4. College Help

5. To all you college students out there!

6. College & Pascal

7. College Programs/Projects?

8. Pascal in College

9. online delphi college course - acredited

10. Please Please, help me with memo-fields, real problem

11. Please, please help me with this code.

12. please, I beg of you help me please.

 

 
Powered by phpBB® Forum Software