title: Question on 0 showing up under my output in CodeRunner
body: <p>I keep getting the correct output answers from the input I get on test cases for my problem on my homework but under my output in CodeRunner, it will show a 0 or crazy decimal under the correct output making the test case wrong. Any Suggestions? </p>
  
  <pre><code>double calcSimScore(string, string);
  
  int main()
  {
      calcSimScore("CATTATGCATTATATACAT", "CATCACCACCCTCCTCCTC");
  }
  
  double calcSimScore(string str1, string str2)
  {
      int i;
      int count = 0;
  
      if (str1.length() == str2.length())
      {
          for (i = 0; i &lt; str1.length(); i++)
          {
              string s1 = str1.substr(i, 1);
              string s2 = str2.substr(i, 1);
              if (s1 != s2)
              {
                  count++;
              }
          }
  
          if (str1.length() - count == 0)
          {
              cout &lt;&lt; 1 &lt;&lt; endl;
          }
          else
          {
              float str = str1.length() - count;
              float len = str1.length();
              float simScore = str / len;
              cout &lt;&lt; simScore &lt;&lt; endl;
          }
      }
      else
      {
          cout &lt;&lt; 0;
      }
  }
  
  </code></pre>
  
  <p>the output I get on CodeRunner is: </p>
  
  <p>0.315789
  3.22526e-319</p>