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


CARD FUNC DivisorCount(CARD n)
  CARD result,p,count
 
  result=1
  WHILE (n&1)=0
  DO
    result==+1
    n=n RSH 1
  OD
 
  p=3
  WHILE p*p<=n
  DO
    count=1
    WHILE n MOD p=0
    DO
      count==+1
      n==/p
    OD
    result==*count
    p==+2
  OD
 
  IF n>1 THEN
    result==*2
  FI
RETURN (result)
 
PROC Main()
  CARD max=[100],n,divCount
 
  PrintF("Tau function for the first %U numbers%E",max)
  FOR n=1 TO max
  DO
    divCount=DivisorCount(n)
    PrintC(divCount) Put(32)
  OD
RETURN