#include <iostream>
#include <cstring>
using namespace std;
char *entry, letter, choice[2];
int ascii, len, binary[8], total;
void bname();
int main()
{
bname();
cout << endl;
system("pause");
}
void bname()
{
entry = new char[501];
cout << "Enter Name :";
cin.getline(entry, 500);
len = strlen(entry);
for(int i = 0; i < len; i++)
{
total = 0;
letter = entry[i];
ascii = letter;
while(ascii > 0)
{
if((ascii%2)==0)
{
binary[total] = 0;
ascii = ascii/2;
total++;
}
else
{
binary[total] = 1;
ascii = ascii/2;
total++;
}
}
total--;
while(total >= 0)
{
cout << binary[total];
total--;
}
}
delete[] entry;
}