C Program to convert decimal number to binary number
# include
# include
void main()
{
int r[20],num,q,j,i=0;
clrscr();
printf("\n Enter Decimal Number : ");
scanf("%d",&num);
while(num!=0)
{
r[i]=num%2;
q=num/2;
num=q;
i++;
}
printf("\n Binary Conversion : ");
for(j=i-1;j>=0;j--)
printf("%d",r[j]);
getch();
}
****************** OUTPUT *********************
Enter Decimal Number : 44
Binary Conversion : 101100
Shopping In MUMBAI
Are you searching for Discounts, offers, sale in Mumbai ? You are in the right place. MUMBAI, a shopping haven, has no dearth of great discounts and sales. This blog features the best MUMBAI shopping offers, sale, discounts and deals and bargains CURRENTLY GOING on in Mumbai plus a few free things thrown in on top.
Don't wait for it because once they are gone, they are gone. Hurry!..By clicking the "Like" button you will receive a daily update of discounts, sale, offers going on in Mumbai. LIKE IT.... SHARE IT...njoY.
Wednesday, December 31, 2008
C Program to convert decimal number to binary number
Posted by ars at 12:04 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment