Hi guys I'm trying to write a program to convert ASCII code into binary but it is not working properly.
This is what I have so far. It works for the letter 'A' but it also output the identical binary number for B or C and it goes completely crazy if I type in 'V'.
using namespace std;
cout<<"Please enter a character: ";
cout<<"You've entered "<<character<<endl;
character = character/2;
int top, bottom;
for(bottom=0,top =7; bottom<8; bottom++,top--)
Please help me find the error.