Posts made in February, 2009

Powers of base 2 in C

This program takes a user input from 1 through 512 (inclusive), and calculates all powers of two that are less than or equal to the value. The program prints out all of these values. NOTE: Due to my usage of the math library’s log function, it is necessary to compile using -lm under Unix systems for the linker to properly define the log function. Information referenced from:...

read more