CPP Program to convert Decimal Number into Binary Number

The program takes any integer number from the standard input device ( keyboard) and convert that number into its equvalant binary number using division method. This program was tried and tested on Dev C++ IDE.  Here is the source code of the same program.

/*	program to convert any decimal number into its equvalent binarynote
	made by		: rakesh kumar
using namespace std;
int main()
	int n, bin[100];
	int rem,i=0;
	//input phase
	cout<<"\n Enter any number : "; cin>>n;
	//processing phase
	 	rem = n%2;
	 	n = int(n/2);
	//output phase
	cout<<"\n Binary No. : "; for(i=i-1;i>=0;i--)
	return 0;

The output of the same program is here. 
Decimal to binary converter
%d bloggers like this: