Writing my first C++ program and I'm asked to do simple computation of counting up the bits of a value that are (1). When the default program is ran without the flag it would output the integer values from base2 up to base16, if a flag is ran with , then it would run from base 2 to base 16 and count up the number of (1)'s in base 2 value.

./bittest 35

if ./bittest -c 35Code:Base 2: 100011 Base 3: 1022 Base 4: 203 Base 5: 120 Base 6: 55 Base 7: 50 Base 8: 33 Base 9: 38 Base 10: 35 Base 11: 32 Base 12: 2b Base 13: 29 Base 14: 27 Base 15: 25 Base 16: 23

Code:BitCount was 3 Base 2: 100011 Base 3: 1022 Base 4: 203 Base 5: 120 etc . . . . .