Annotation of 43BSDTahoe/ucb/pascal/tstpx/src/palindromes.p, revision 1.1.1.1

1.1       root        1: program palindromes(output);
                      2:   var i,j,l,n,r,s: integer;
                      3:       p: boolean;
                      4:       d: array [1..10] of integer;
                      5: begin n := 0; writeln(wallclock);
                      6:   repeat n := n+1; s := n*n; l := 0;
                      7:     repeat l := l+1; r := s div 10;
                      8:       d[l] := s - 10*r; s := r
                      9:     until s = 0;
                     10:     i := 1; j := l;
                     11:     repeat p := d[i]=d[j];
                     12:       i := i+1; j := j-1
                     13:     until (i>=j) or not p;
                     14:     if p then writeln(n,n*n)
                     15:   until n = 200;
                     16:   writeln(wallclock)
                     17: end .

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.