/* CS201 Programming Project Programmer: RJB Project: Chapter 3 and 5 Demonstrating: Using char string to output binary Description/Vision/algorithm Input a decimal integer and output it in binary, repeat Versions: Downloaded Dr. Botting's skeleton file. Wed Feb 6 17:49:27 PST 2008 Infinite loop Wed Feb 6 17:55:14 PST 2008 */ #include #include using namespace std; int main() { char bits[]={'0','1'}; int number; cout << "Number? "; while(cin >> number) { if(number<0) cout << "This version can't handle negative numbers, sorry\n"; else if(number==0) cout << "0\n"; else { string binary; while(number > 0) { // cout << number <<" " << bits[ number % 2 ] <