source: git/Tst/Old/smm.tst @ b35b93

spielwiese
Last change on this file since b35b93 was b35b93, checked in by Olaf Bachmann <obachman@…>, 26 years ago
This commit was generated by cvs2svn to compensate for changes in r1396, which included commits to RCS files with non-trunk default branches. git-svn-id: file:///usr/local/Singular/svn/trunk@1397 2c84dea3-7e68-4137-9b89-c4e89433aadc
  • Property mode set to 100644
File size: 1.1 KB
Line 
1int d;
2int e;
3int n;
4int r;
5int o;
6int s;
7int y;
8int ode; int onr; int oeo; int osm;
9for (d=2; d<9; d=d+1)
10{
11  for (e=2; e<9; e=e+1)
12  {
13    if (e == d)
14    {
15      e = e + 1;
16      continue;
17    }
18    for (n=2; n<9; n=n+1)
19    {
20      if ( (n == d) or (n == e))
21      {
22        n = n + 1;
23        continue;
24      }
25      for (r=2; r<9; r=r+1)
26      {
27        if ((r == d) or (r == e) or (r == n) )
28        {
29        r = r + 1;
30        continue;
31        }
32        o = 0;
33        s = 9;
34        d, e, n, r, o, s;
35        y = d + e;
36        ode = y / 10;
37        y = y % 10;
38        if (!((n + r + ode) % 10 <> e ))
39        {
40          onr = (n + r + ode) / 10;
41          if (!( (e + o + onr) % 10 <> n ))
42          {
43            oeo = (e + o + onr) / 10;
44            if (!( (s + 1 + oeo) % 10 <> o ))
45            {
46              osm = (s + 1 + oeo) / 10;
47              if (osm == 1)
48              {
49                " "+string(s )+string(e)+string(n)+string(d);
50                " 1"+string(o)+string(r)+string(e);
51                "1"+string(o)+string(n)+string(e)+string(y);
52                $
53              }
54            }
55          }
56        }
57      }
58    }
59  }
60}
61$
Note: See TracBrowser for help on using the repository browser.