Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
20
Task/Tau-number/XPL0/tau-number.xpl0
Normal file
20
Task/Tau-number/XPL0/tau-number.xpl0
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
func Divs(N); \Return number of divisors of N
|
||||
int N, D, C;
|
||||
[C:= 0;
|
||||
for D:= 1 to N do
|
||||
if rem(N/D) = 0 then C:= C+1;
|
||||
return C;
|
||||
];
|
||||
|
||||
int C, N;
|
||||
[Format(5, 0);
|
||||
C:= 0; N:= 1;
|
||||
loop [if rem(N/Divs(N)) = 0 then
|
||||
[RlOut(0, float(N));
|
||||
C:= C+1;
|
||||
if rem(C/10) = 0 then CrLf(0);
|
||||
if C >= 100 then quit;
|
||||
];
|
||||
N:= N+1;
|
||||
];
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue