title: How can I get exact division of decimals for more than 9 digits?
body: <p>When doing this</p>
  
  <pre><code>float d = (106108048) / (float)10;
  </code></pre>
  
  <p>The output is <code>1.0610805E7</code>, but I need exactly <strong><code>10610804.8</code></strong>. What is correct way to do that?  </p>
  
  <p>On Hacker Rank, I was solving the following problem: You are given a number N, you need to print the number of positions where digits exactly divides N.</p>
  
  <p>Input:</p>
  
  <pre><code>1
  106108048  
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>5  
  </code></pre>
  
  <p>My Solution:</p>
  
  <pre><code> import java.io.*;
   import java.util.*;
   import java.math.*;
  
  
      public class Solution{
  
          public static void main(String[] args){
              Scanner sc = new Scanner(System.in);
              int p = 0;
              boolean check = true;
              while(sc.hasNext()){
                  if(check){
                      check= false;
                      sc.next();
                  }
                  Integer number = sc.nextInt();
                  String snumner = number.toString();
                  int q = 1;
                  int j = 0;
                  for(int i = 0 ; i&lt; snumner.length();i++ ){
                              q = q *10;
                              p = q;
                     System.out.println("p:"+p)
                     System.out.println("number:"+number);
                      float d = (number)/(float)p;//problem is here
                      System.out.println("ddd:"+d);
                      String ss = String.valueOf(d);
                      System.out.println("SS:"+ss);
                      int index = ss.indexOf('.');
                      System.out.println("in"+index);
                      System.out.println("VV"+ss.charAt(index+1));
                      String newn = " " + ss.charAt(index+1);
                      int sss= Integer.parseInt(newn.trim());
                     System.out.println("SSS"+sss);
                      if(sss != 0){
                      if(number%sss ==0){
                          j++;
                       }
                      }
                  }
                  System.out.println("no:"+j);
              }
          }
      }
  </code></pre>