Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
18
Task/Odd-word-problem/TUSCRIPT/odd-word-problem.tu
Normal file
18
Task/Odd-word-problem/TUSCRIPT/odd-word-problem.tu
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
$$ MODE TUSCRIPT
|
||||
inputstring=*
|
||||
DATA what,is,the;meaning,of:life.
|
||||
DATA we,are;not,in,kansas;any,more.
|
||||
|
||||
BUILD C_GROUP >[pu]=".,;:-"
|
||||
|
||||
LOOP i=inputstring
|
||||
pu=STRINGS (i,"|>[pu]|")
|
||||
wo=STRINGS (i,"|<></|")
|
||||
outputstring=""
|
||||
loop n,w=wo,p=pu
|
||||
r=MOD(n,2)
|
||||
IF (r==0) w=TURN (w)
|
||||
outputstring=CONCAT(outputstring,w,p)
|
||||
ENDLOOP
|
||||
PRINT outputstring
|
||||
ENDLOOP
|
||||
Loading…
Add table
Add a link
Reference in a new issue