c programming

Wednesday, 19 August 2015

Programming in C to convert the Decimal number to Binary digits

#include<stdio.h>
#include<conio.h>
void main()
{
int x,y=40;
clrscr();
printf("Enter a number:");
scanf("%d",&x);
printf("\n Binary number:");
while(x!=0)
{
gotoxy(y--,3);
printf("%d",x%2);
x=x/2;
}
getch();
}
Posted by Unknown at 05:11
Email ThisBlogThis!Share to XShare to FacebookShare to Pinterest

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

About Me

Unknown
View my complete profile

Blog Archive

  • ▼  2015 (15)
    • ▼  August (15)
      • Codes for a record entry project
      • Why we learn C language today?
      • C Basic
      • Programming in C to test that the given number is ...
      • Programming in C to find the cube of any number
      • Programming in C to find the square of the given n...
      • Programming in C to reverse a number
      • Programming in C to convert a letter from upper to...
      • Programming in C to find the sum of the given number
      • Programming in C to convert the Decimal number to ...
      • Programming in C to find the factorial of given nu...
      • Structure Of A C Program
      • Programming in C to find the name of the day of th...
      • Programming in C to find the value of any variable...
      • History of C
Travel theme. Powered by Blogger.