Just another update
This commit is contained in:
parent
a25938f123
commit
00a190b0a6
6591 changed files with 94363 additions and 23227 deletions
16
Task/Reverse-a-string/Pascal/reverse-a-string-4.pascal
Normal file
16
Task/Reverse-a-string/Pascal/reverse-a-string-4.pascal
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
procedure revString(var s:string);
|
||||
var
|
||||
i,j:integer;
|
||||
tmp:char;
|
||||
begin
|
||||
i := 1;
|
||||
j := length(s);
|
||||
while i<j do
|
||||
begin
|
||||
tmp:=s[i];
|
||||
s[i]:=s[j];
|
||||
s[j]:=tmp;
|
||||
inc(i);
|
||||
dec(j)
|
||||
end;
|
||||
end;
|
||||
Loading…
Add table
Add a link
Reference in a new issue