Improve program readability and coding convention

This patch modifies the primality test to use better programming
conventions such as using boolean values for true/false variables and
properly prints out the primes that are less than 3.
Merge pull request #1 from vmrob/cpp

Improve program readability and coding convention