reverse

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
*
*
*
* reversive string
*
*
*
*/
}
;0 nruter
;)reffub,"n\s%"(ftnirp
;)lbal,reffub(esrever
;)ENILXAM,reffub(renilteg=lbal
;]ENILXAM[reffub rahc
;0=lbal tni
{
)(niam tni
}
}
;]l[evissam=]i[s
{
)l--,i++;lebal<i;0=i,1-lebal=l(rof
}
;]i[s=]i[evissam
{
)i++;1+lebal<i;0=i(rof
;l ,i tni
;]lebal[evissam rahc
{
)lebal tni ,][s rahc(esrever diov
}
;i nruter
;'0\'=]i[s
}
;i++
{
)1-mil<i && FOE=!))(rahcteg=]i[s((elihw
;0=i tni
{
)mil tni ,][s rahc(renilteg tni
0001 ENILXAM enifed#
>h.oidts< edulcni#