|
#include <stdio.h>
|
|
#include "digit_count.h"
|
|
|
|
unsigned long power_of_two(unsigned char n)
|
|
{
|
|
return 1ul << n;
|
|
}
|
|
|
|
int main()
|
|
{
|
|
unsigned long n = 63 ;
|
|
for(unsigned long i = 0; i <= n; i+=1)
|
|
{
|
|
printf("digit_count(%lu) = %u\n",power_of_two(i),digit_count(power_of_two(i)));
|
|
}
|
|
return 0;
|
|
}
|