RosettaCodeData/Task/Odd-word-problem/XPL0/odd-word-problem.xpl0
2023-07-01 13:44:08 -04:00

33 lines
579 B
Text

proc OWP;
int B;
func Odd;
int S, B;
[S:= ChIn(8);
if S < ^A then \punct\ return S;
B:= Odd;
ChOut(0, S);
return B;
];
[OpenI(8);
loop [loop [B:= ChIn(8);
ChOut(0, B);
if B = ^. then return;
if B < ^A \punct\ then quit;
];
B:= Odd;
ChOut(0, B);
if B = ^. then return;
];
];
[OpenO(8);
Text(8, "what,is,the;meaning,of:life. ");
OWP;
CrLf(0);
OpenO(8);
Text(8, "we,are;not,in,kansas;any,more. ");
OWP;
CrLf(0);
]