(In reply to
re(2): computer exploration (spoiler?) --------- Can you check? by K Sengupta)
Aha! Foiled by the programming language!
In QuickBasic, GWBasic, Visual Basic,
mid(H,Ix+1)
gives you the the entire remainder of string H starting with position Ix+1, as does SUBSTR(H,IX+1) in PL/I and other languages. In UBASIC it gives only the one character at position Ix+1. If you want the whole remainder of the string you need to code an * as the third parameter.
Changing two lines:
650 H=left(H,Ix-1)+mid(H,Ix+1,*)
and
690 H=left(H,Ix-1)+mid(H,Ix+1,*)
So
The two triplets are
1487 4817 8147
2969 6299 9629
|
Posted by Charlie
on 2009-01-30 16:22:55 |