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
% 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
if n > 1 then total := total * 2;
total
|