title: Dividing two numbers
body: <p>I'm doing some self-education in C#, and although I did more complex projects than this, I can't figure out what the problem is.</p>
  
  <pre><code>    private void button4_Click(object sender, EventArgs e)
      {
          int headcount = 0;
          int input = Global.inputcount;
  
          for (int i = 0; i &lt; Global.inputcount; i++)
          {
              if (Global.myTextFile[i] == "F")
              {
                  headcount++;
              }
          }
          float result;
          result = headcount/input; &lt;&lt;&lt; that line
          button4.Text = result.ToString();
      }
  </code></pre>
  
  <p>This is my code, its supposed to count how many times does <code>F</code> occour in the <code>myTextFile</code> array, and it should divide that number with the number of inputs.</p>
  
  <p>I debugged it many times, and everything is fine until [that] line. Result is 0 despite the fact that (headcount = ~2201) and (input = ~4321).</p>
  
  <p>I used to work with pascal, I've been using C# for like 2 months so if anyone can help me out i would be grateful.</p>
  
  <p><code>F</code> stands for "Fej" = "Head" in Hungarian</p>