39 lines
571 B
Text
39 lines
571 B
Text
Procedure.b eqrf(n.i)
|
|
sn.s = Str(n)
|
|
q.i = 0
|
|
|
|
For i.i = 2 To Len(sn)
|
|
If Asc(Mid(sn, i, 1)) > Asc(Mid(sn, i - 1, 1)):
|
|
q + 1
|
|
Else
|
|
If Asc(Mid(sn, i, 1)) < Asc(Mid(sn, i - 1, 1)):
|
|
q - 1
|
|
EndIf
|
|
EndIf
|
|
Next
|
|
If q = 0:
|
|
ProcedureReturn #True
|
|
Else
|
|
ProcedureReturn #False
|
|
EndIf
|
|
|
|
EndProcedure
|
|
|
|
OpenConsole()
|
|
c.i = 0
|
|
i.i = 1
|
|
While c < 10000001
|
|
If eqrf(i):
|
|
c + 1
|
|
If c <= 200:
|
|
Print(" " + Str(i))
|
|
EndIf
|
|
If c = 10000000:
|
|
PrintN(#CRLF$ + Str(i))
|
|
EndIf
|
|
EndIf
|
|
i + 1
|
|
Wend
|
|
|
|
Input()
|
|
CloseConsole()
|