This little program a solution for putting a string into an array.
The method is that the string is divided for chars....
By FlamingClaw

75 Views
Program StringIntoArray;

Uses Crt;
Const max = 11;
Var S:String[max];
    i:Byte;
    size:Byte;
    Ar:Array[1..max]of Char;


Begin {main}
     ClrScr;
     Write('Give me the word,max 11 char: ');
     ReadLn(S);
     size:=Length(S);
     For i:=1 To size Do
        Begin
           Ar[i]:=S[i];
           If (i = size) Then Break;
        End;

     {Now write the results}
     For i:=1 To size Do WriteLn(Ar[i]);

     ReadKey;
End. {main}
(*Created By FlamingClaw 2009.03.11*)
About the Author

Just living in hungary.Teaching myself in pascal.
I have time to programming when I'm going to home,cause my job is not a good place for that.
Don't forget that if you ask something on the forum and you got the right answer then
[b] mark as solved !![/b]