Tau number: Difference between revisions

m (syntax highlighting fixup automation)
Line 676:
=={{header|Cowgol}}==
<syntaxhighlight lang="cowgol">include "cowgol.coh";
# <nowiki>Numbered list item</nowiki>
 
# Get count of positive divisors of number
Line 722 ⟶ 723:
856 864 872 876 880 882 896 904 936 948
972 996 1016 1040 1044 1048 1056 1068 1089 1096</pre>
 
=={{header|Craft Basic}}==
<syntaxhighlight lang="basic">define count = 0, num = 0, mod = 0
define nums = 100, tau = 0
 
do
 
let count = count + 1
let tau = 0
let mod = 1
 
do
 
if count % mod = 0 then
 
let tau = tau + 1
 
endif
 
let mod = mod + 1
 
loop mod < count + 1
 
if count % tau = 0 then
 
let num = num + 1
print count
 
endif
 
loop num < nums
 
end</syntaxhighlight>
 
=={{header|D}}==
305

edits