Hellow Friends I always want to share my knowledge which i have.I am currently from India and I just completed my MCA and working as an Asp.Net Developer.
#include<conio.h>
#include<stdio.h>
int main()
{ int no,v,r,i=1,b=0; printf("Please enter decimal number"); scanf("%d",&no); v=no; while(no!=0) { r=no%2; no=no/2; b=b+(r*i); i=i*10; } printf("binary value is =%d",b); getch();
No comments:
Post a Comment