how can i do this code to display "C" in binary numbers?
and also, how can i convert a binary number from a decimal number, which was inputted by the user?How do i display that binary number as a string?Code:#include <iostream> using namespace std; int main() { unsigned char A = 0xF8; unsigned char B = 0x5A; unsigned int C; C = ~A; cout << C << endl; C = ~B; cout << C << endl; C = A<<2; cout << C << endl; C = A>>3; cout << C << endl; C = B<<1; cout << C << endl; C = B>>4; cout << C << endl; system("PAUSE"); }