//
#include
#include
#include
void main()
{
int dec=0,i=0,d;
long bin;
clrscr();
printf("Enter the number \n");
scanf("%ld",&bin);
for(i=0;bin>0;i++)
{
d=bin%10;
dec=dec+(d*pow(2,i));
bin=bin/10;
}
printf("The decimal =\t%d",dec);
getch();
}
-->
Copyright 2009 CSedukit.com. Powered by
Blogger.
Blogger Templates created by Deluxe Templates
Wordpress theme by digitalnature
0 comments:
Post a Comment