numberbinary


  1. #include<iostream.h>
  2. #include<conio.h>
  3. void main(){
  4. clrscr();
  5. int n,r;
  6. cout<<"enter the integer= ";
  7. cin>>n;
  8. while(n>=1)
  9. {
  10. r=n%2;
  11. n=n/2;
  12. cout<<r;
  13. }
  14. getch();
  15. }