how to find the binary of a number?

Answer Posted / subhashini

#include<stdio.h>
#include<conio.h>
{
clrscr();
int i,sum,n;
printf("enter the number");
scanf("%d",&n);
while(n>=1)
{
i=n%2;
sum=sum*10+i;
n=n/2;
getch();
}
printf("the binary number is: %d",i)

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is use of #include in c?

603


What is external variable in c?

617


What is quick sort in c?

588


Write a program to swap two numbers without using third variable in c?

620


Do pointers need to be initialized?

566






What is operator promotion?

632


Write a program to find factorial of a number using recursive function.

648


write a program to copy the string using switch case?

2404


Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop

1719


diff between exptected result and requirement?

1597


what do the 'c' and 'v' in argc and argv stand for?

648


What is mean by data types in c?

555


What tq means in chat?

584


WHICH TYPE OF JOBS WE GET BY WRITING GROUPS .WHEN THE EXAMS CONDUCTED IS THIS EXAMS ARE CONDUCTED EVERY YEAR OR NOT.PLS TELL ME THE ANSWER

1463


the portion of a computer program within which the definition of the variable remains unchanged a) mode b) module c) scope d) none

652