/*Find Binary Number Of Any Given Decimal Number (In Reverse Order) */
#include <stdio.h>
int main(void)
{
int num,j,k = 0;
printf("Enter a number whose binary you want to know :");
scanf("%d",&num);
j = num ;
while ( j > 0)
{
k = j % 2;
printf("%d ",k );
j = j / 2 ;
continue;
}
printf("\n");
return 0;
}
No comments:
Post a Comment