I dont really know how the whole program works. ?_?
especially the first one.
can someone tell me please.
#include<stdio.h>
int dec_bin(int bin)
{
int x, y;
x = y = 0;
for(y = 7; y >= 0; y--)
{
x = bin / (1 << y);
bin = bin - x * (1 << y);
printf("%d", x);
}
printf("\n");
}
int main ()
{
int count;
printf("\n\n\nConversion table - Decimal, Hexadecimal, Octal, Binary\n\n");
printf("Dec\tHex\tOct\tBin\n");
printf("----------------------------------\n");
for (count = 0; count <=256; count=count +1)
{
printf("%d \t%x \t%o\t",count, count, count);
dec_bin(count);
}
}