Given a positive integer, count the number of its positive divisors.



Task
Show the result for the first   100   positive integers.



Related task
  Tau number


MODULE TauFunc;
FROM InOut IMPORT WriteCard, WriteLn;
 
VAR i: CARDINAL;
 
PROCEDURE tau(n: CARDINAL): CARDINAL;
    VAR total, count, p: CARDINAL;
BEGIN
    total := 1;
    WHILE n MOD 2 = 0 DO
        n := n DIV 2;
        total := total + 1
    END;
    p := 3;
    WHILE p*p <= n DO
        count := 1;
        WHILE n MOD p = 0 DO
            n := n DIV p;
            count := count + 1
        END;
        total := total * count;
        p := p + 2
    END;
    IF n>1 THEN total := total * 2 END;
    RETURN total;
END tau;
 
BEGIN
    FOR i := 1 TO 100 DO
        WriteCard(tau(i), 3);
        IF i MOD 20 = 0 THEN WriteLn END
    END
END TauFunc.