# include <stdio.h>
# include <conio.h>
# include <iostream>
toBiner void (int n)
{
if (n> 1)
{
toBiner (n / 2);
}
cout <<n% 2;
getch ();
}
int main ()
{
int a;
cout <<"Enter a number to be converted:";
cin>> a;
cout <<a <<"in binary is";
toBiner (a);
return 0;
}
0 Response for the "Decimal to Binary Conversion in C++"
Post a Comment