how to convert integer to decimal
Program
#include<stdio.h>
#include<conio.h>
void
main(void)
{
int n,c,k;
printf("\n Enter a integer in
decimal:");
scanf("%d",&n);
printf("\n %d in binary:",n);
for(c=31;c>=0;c--)
{
k=n>>c;
if(k&1)
printf("1");
else
printf("0");
}
printf("\n");
}
This comment has been removed by the author.
ReplyDeleteThis is a great post. I like this topic.This site has lots of advantage.I found many interesting things from this site. It helps me in many ways.Thanks for posting this again. hex To decimal Online convertor
ReplyDelete