Expand|Select|Wrap|Line Numbers
- /*******
- *@Author Lokanath Behera
- *@Mob-[removed]
- *@Email-[removed]@gmail.com
- *****/
- class Binary{
- public static void main(String[] args){
- int no=19999;
- int i=0;
- int size=no/2;
- int a[]=new int[++size];
- while(no>0){
- if(no%2==0){
- a[i++]=0;
- }
- else{
- a[i++]=1;
- }
- no /=2;
- }
- for(int j=i-1;j>=0;j--){
- System.out.print(a[j]);
- }
- }
- }