Tau function: Difference between revisions

→‎{{header|ALGOL W}}: Added syntax highlighting
(Added Algol 68)
(→‎{{header|ALGOL W}}: Added syntax highlighting)
Line 130:
=={{header|ALGOL W}}==
{{Trans|C++}}
<lang algolwpascal>begin % find the count of the divisors of the first 100 positive integers %
% calculates the number of divisors of v %
integer procedure divisor_count( integer value v ) ; begin
Line 152:
total := total * count
end while_p_x_p_le_n ;
% If n > 1 then it's is prime %
if n > 1 then total := total * 2;
total
3,026

edits