Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
20
Task/Tau-number/PureBasic/tau-number.basic
Normal file
20
Task/Tau-number/PureBasic/tau-number.basic
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
OpenConsole()
|
||||
|
||||
Procedure.i numdiv(n)
|
||||
c=2
|
||||
For i=2 To (n+1)/2 : If n%i=0 : c+1 : EndIf : Next
|
||||
ProcedureReturn c
|
||||
EndProcedure
|
||||
|
||||
Procedure.b istau(n)
|
||||
If n=1 : ProcedureReturn #True : EndIf
|
||||
If n%numdiv(n)=0 : ProcedureReturn #True : Else : ProcedureReturn #False : EndIf
|
||||
EndProcedure
|
||||
|
||||
c=0 : i=1
|
||||
While c<100
|
||||
If istau(i) : Print(RSet(Str(i),4)+#TAB$) : c+1 : If c%10=0 : PrintN("") : EndIf: EndIf
|
||||
i+1
|
||||
Wend
|
||||
|
||||
Input()
|
||||
Loading…
Add table
Add a link
Reference in a new issue