' SmallBasic / tomix@tiscali.cz
'   dotazy x 8 = poradna

kolikrat=8
dotazy=125000
While dotazy<999999
  dotazy = dotazy + 1
  d= Text.GetSubText(dotazy,1,1)
  o= Text.GetSubText(dotazy,2,1)
  t= Text.GetSubText(dotazy,3,1)
  a= Text.GetSubText(dotazy,4,1)
  z= Text.GetSubText(dotazy,5,1)
  y= Text.GetSubText(dotazy,6,1)
  If (y<>z) And (y<>a) And (y<>t) And (y<>o) And (y<>d) Then
    If (z<>a) And (z<>t) And (z<>o) And (z<>d) Then
      If (a<>t) And (a<>o) And (a<>d) Then
        If (t<>o) And (t<>d) Then
          If (o<>d) Then
            'TextWindow.WriteLine("debug 1: dotazy= " + dotazy)
            poradna=dotazy * kolikrat
            a3= Text.GetSubText(poradna,7,1)
            a2= Text.GetSubText(poradna,4,1)
            o2= Text.GetSubText(poradna,2,1)
            d2= Text.GetSubText(poradna,5,1)
            If (a3=a2) And (a3=a) then
              If (o=o2) then
                If (d=d2) then
             'TextWindow.WriteLine("debug 2:" + dotazy + ".." + poradna)
              p= Text.GetSubText(poradna,1,1)
              r= Text.GetSubText(poradna,3,1)
              n= Text.GetSubText(poradna,6,1)
              If (a3<>n) and (a3<>r) and (a<>p) then
                If (n<>d) and (n<>r) and (n<>o) and (n<>p) and(n<>t) and (n<>y) and (n<>z) then
                  If (d<>r) and (d<>p) then
                    If  (r<>o) and (r<>p) and (r<>y) and (r<>z) and (r<>t)then
                      If (o<>p) then
                        If (p<>y) and (p<>z) and (p<>t) then
                          TextWindow.WriteLine("dotazy"+ " krát " + kolikrat +" poradna")
                          TextWindow.WriteLine(dotazy + " krát " + kolikrat + "=" + poradna)
                        EndIf 
                      EndIf
                    EndIf
                  EndIf
                EndIf
              EndIf
            EndIf
          EndIf
        EndIf
        EndIf
        EndIf
      EndIf
    EndIf
  EndIf
EndWhile
TextWindow.WriteLine("Konec cyklu")


         
            
            
            