Try to avoid using conio it is a nonstandard library also instead of getch() you can use cin.get().
For line 11 I would suggest using a while loop instead
1 2 3 4 5 6 7 8
int j = i;
while( j != 0 )
{
a = j % 2;
cout << a;
j /= 2; //compound operator same as j = j / 2;
}
cout << endl;
As far as reversing you can either store all the values into an array then output the reversed array. or you will have to reverse your loops so they start form the end and work to the beginning.